'Code By 魑魅魍魉
'mailto:DemonStudio@hotmail.com
Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
Private Sub Form_Load()
Op.Value = True
Ch.Value = 1
SetWindowLong Command1.hwnd, -16, &H50008000
SetWindowLong Ch.hwnd, -16, GetWindowLong(Ch.hwnd, -16) + &H1000
SetWindowLong List1.hwnd, -20, &H105
SetWindowLong Text1.hwnd, -20, &H105
SetWindowLong Op.hwnd, -16, GetWindowLong(Op.hwnd, -16) + &H1000
SetWindowLong Op1.hwnd, -16, GetWindowLong(Op1.hwnd, -16) + &H1000
End Sub
效果如下:
博客展示了一段VB代码,通过声明SetWindowLong和GetWindowLong函数,在Form_Load事件中对Command1、Ch、List1等控件使用SetWindowLong函数进行设置,以达到特定效果。
726

被折叠的 条评论
为什么被折叠?



