变更窗体图标
时间:2003-12-20 23:22 来源:The Access Web 作者:The Acce… 阅读:次
Declare Function LoadImage Lib "user32" Alias "LoadImageA" (ByVal hInst As Long, _
ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, _
ByVal un2 As Long) As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
ByVal lpsz As String, ByVal un1 As Long, ByVal n1 As Long, ByVal n2 As Long, _
ByVal un2 As Long) As Long
Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, _
ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Const WM_SETICON = &H80
Const IMAGE_ICON = 1
Const LR_LOADFROMFILE = &H10
Function SetFormIcon(hwnd As Long, IconPath As String) As Boolean
On Error GoTo Exit_ERR
Dim hIcon As Long
hIcon = LoadImage(0&, IconPath, IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
If hIcon <> 0 Then
Call SendMessage(hwnd, WM_SETICON, 0, ByVal hIcon)
SetFormIcon = True
Else
End
End If
Exit_ERR:
Exit Function
End Function
(责任编辑:admin)
顶一下
(0)
0%
踩一下
(0)
0%
相关内容
- ·API函数详细解释
- ·Access从剪切版里复制和粘贴数据
- ·Access利用api实现打开/关闭光驱
- ·应用程序开机自动启动(注册表操作技巧
- ·Access VBA 判断网络是否连通的多种办
- ·什么是ADP,了解ADP的优缺点
- ·优秀产品大全--通用票据打印软件(新)
- ·[技巧分享]多条Shell语句执行导致判断
- ·在access中可以调用API函数GetFileInfo
- ·Access API集中营--增加临时使用的字体
- ·API ShellExecute 功能说明及应用示例
- ·在VB中使用API函数(什么是API? )
- ·API实现完美的图片出现效果(转)
- ·API 设置调整系统当前时间
- ·如何检测以及设置键盘状态
- ·不关闭当前数据库COPY当前数据库
最新内容
推荐内容