以下是引用小刀神在2018-5-31 11:19:54的发言:
以下这些代码分别是什么意思?
Public Const HTCAPTION = 2
Public Const WM_NCLBUTTONDOWN = &HA1
Public Declare Function ReleaseCapture Lib "user32" () As Long
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
另,鼠标经过Image控件后,Image的Picture属性中的文件变换,当鼠标离开这个控件时,控件中的这个属性在次换回原先的图片,怎么做?
程序代码:
Public Const HTCAPTION = 2 '声明了一个全局常量,名称是 HTCAPTION ,值是 2
Public Const WM_NCLBUTTONDOWN = &HA1 '声明了一个全局常量,名称是 WM_NCLBUTTONDOWN ,值是 HA1,是十六进制数
'-----------------
Public Declare Function ReleaseCapture Lib "user32" () As Long '不完全的一个函数引用,缺少函数的参数,
Public Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As Long
'给你一个标准函数声明,供参考:
Public Declare Function SHGetSpec Lib "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As Long) As Long
'Public Declare Function-------声明一个全局函数,SHGetSpec----------函数名称,Lib "shell32.dll"---------函数调用的位置
' (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As Long)-----函数的参数,最后的 As Long 是函数的返回值。
'----------------
' 鼠标经过Image控件后,Image的Picture属性中的文件变换,当鼠标离开这个控件时,控件中的这个属性在次换回原先的图片
二楼 wds1 回答可行
[此贴子已经被作者于2018-6-2 12:32编辑过]