初学VB,寻求注释,请把?处写上注释,谢谢

来源:百度知道 编辑:UC知道 时间:2024/05/26 14:29:51
Private item_height As Single ??此变量的作用
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd _
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const LB_GETITEMHEIGHT = &H1A1 ??

Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
If Not (Source Is List1) Then Exit _
Sub
If List1.ListIndex >= 0 Then
List1.RemoveItem List1.ListIndex
End If

End Sub

Private Sub Form_Load()
List1.AddItem "picture"
List1.AddItem "list"
List1.AddItem "today"
List1.AddItem "cat"
item_height = Screen.TwipsPerPixelY * SendMessage(List1.hwnd, LB_GETITEMHEIGHT, 0, vbNullString) ??
End Sub

Private Sub List1_DragDrop(Source As Control, X As Single, Y As Single)
Dim new_pos As Integer
If Not (Source Is List1) Then Exit Sub
new_pos =

Private item_height As Single
'Private,表示这声明只限于这个子过程(如果写在过程/函数内),如果写在函数外,则表示这声明只限于本模块

Private item_height As Single
'等同于 Dim item_height as single,声明变量item_height为单精度类型

Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd _
As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long

Private Const LB_GETITEMHEIGHT = &H1A1
'声明常量,常量值为&H1A1(16制制数,等于十进制数417)

Private Sub Form_DragDrop(Source As Control, X As Single, Y As Single)
If Not (Source Is List1) Then Exit _
Sub
If List1.ListIndex >= 0 Then
List1.RemoveItem List1.ListIndex
End If

End Sub

Private Sub Form_Load()
List1.AddItem "picture"
List1.AddItem "list"
List1.AddItem "today"
List1.AddItem "cat"
item_height = Screen.TwipsPerPixelY * SendMessage(List1.hwnd, LB_GETIT