mdsk.net
当前位置:首页 >> vB高手进, ListBox 怎样点击选中某一行啊??用那... >>

vB高手进, ListBox 怎样点击选中某一行啊??用那...

你好,List1.ListIndex才是当前用户点击的项目编号,melovefree的方法需要你开启checkbox属性才能生效.正确的方法如下: Private Sub List1_Click() Dim c As String c = List1.List(List1.ListIndex) Clipboard.SetText c MsgBox c End Sub

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As LongConst LB_ITEMFROMPOINT = &H1A9Private Sub List1_MouseDown(Button As Int...

我加装播放控件(图),再“工具栏” 右键 "部件",选择控件(图),然后代码视图里打代码: 代码如下: Private Sub List1_DblClick() W1.URL = List1.Text End Sub 还有记住代码里的控件名称,有些人是不一样的(W1),listbox的list属性要写完整...

外部程序里的部件可用句柄控制

在VB里改不了,只能是同一种颜色。 Visual Basic是一种由 Microsoft 公司开发的结构化的、模块化的、面向对象的、包含协助开发环境的事件驱动为机制的可视化程序设计语言。从任何标准来说,VB都是世界上使用人数最多的语言——不管是盛赞VB的开发...

假定文本框在Form1,列表框在Form2,则以下代码放在Form2: Private Sub List1_Click() Dim s As String, i As Integer For i = 0 To List1.ListCount - 1 If List1.Selected(i) Then If s "" Then s = s & "," s = s & List1.List(i) End If N...

在listbox 的change 或者lostfost 事件里 写 textbox.text = listbox.selected.text

Private Sub List1_Click() Text1.Text = List1.Text End Sub

问题1: Private Sub Command1_Click() list1.list(list1.listindex) = text1.text end sub 问题2: Private Sub Command2_Click() dim fn as string, i as long fn="E:\大刚缴费系统\" & Year(Now) & "\" & Month(Now) & "\" & Day(Now) & ".tx...

Private Sub Form_Load()Dim s As StringOpen "d:\abc\123.txt" For Input As #1 '文件名自己改List1.ClearDo Until EOF(1) Line Input #1, s List1.AddItem sLoopClose #1End SubPrivate List1_Click()Text1.Text = Text1.Text & List1.TextLis...

网站首页 | 网站地图
All rights reserved Powered by www.mdsk.net
copyright ©right 2010-2021。
内容来自网络,如有侵犯请联系客服。zhit325@qq.com