Access开发培训
网站公告
·Access专家课堂QQ群号:151711184    ·Access快速开发平台下载地址及教程    ·欢迎加入Access专家课堂微信群!    ·如何快速搜索本站文章|示例|资料    
您的位置: 首页 > 技术文章 > Access数据库-模块/函数/VBA

移动无边框窗体代码

时 间:2012-06-09 08:50:16
作 者:风行   ID:16058  城市:江阴
摘 要:如下
正 文:

模块:

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

Declare Function ReleaseCapture Lib "user32" () As Long

Public Const WM_NCLBUTTONDOWN = &HA1

Public Const HTCAPTION = 2

 

应用

Private Sub Form_Close()

DoCmd.RunCommand acCmdAppMaximize

End Sub

 

Private Sub Form_Load()

DoCmd.RunCommand acCmdAppMinimize

End Sub

 

Private Sub XPForm_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)

 If Button = 1 Then

    ReleaseCapture

    SendMessage Me.hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&

 End If

End Sub

 

Private Sub 命令20_Click()

DoCmd.Close

End Sub


Access软件网官方交流QQ群 (群号:54525238)       Access源码网店

常见问答:

技术分类:

相关资源:

专栏作家

关于我们 | 服务条款 | 在线投稿 | 友情链接 | 网站统计 | 网站帮助