|
正常情况下,一般窗体可以在Access系统环境设置中来设置是否在任务栏中显示打开的窗体,但如果将窗体设为弹出之后就不能在任务栏显示了,这里通过调用API函数实现将Access弹出窗体加入到任务栏- Private Declare Function GetWindowLong Lib "user32" Alias "GetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long) As Long
- Private Declare Function SetWindowLong Lib "user32" Alias "SetWindowLongA" (ByVal hwnd As Long, ByVal nIndex As Long, ByVal dwNewLong As Long) As Long
- '===================================================================
- '函数名称: AddPopupFormToTaskbar
- '功能描述: 将Access弹出窗体加入到任务栏
- '输入参数: 参数1 PopupForm 必需的,弹出窗体对象
- '返回参数: 无
- '兼 容 性:
- '使用示例: AddPopupFormToTaskbar Me
- '相关调用: GetWindowLong() SetWindowLong()
- '作 者: 红尘如烟
- '创建日期: 2009-4-20
- '===================================================================
- Public Function AddPopupFormToTaskbar(PopupForm As Form)
- SetWindowLong PopupForm.hwnd, -20, GetWindowLong(PopupForm.hwnd, -20) or &H40000
- End Function
复制代码 |
|