请问怎样用控件代替标题栏

daewoo 2003-12-25 09:59:42
而且支持最小化和关闭,用什么语句或属性?谢谢!
...全文
26 点赞 收藏 4
写回复
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
daewoo 2003-12-26
Form1.WindowState = 1 为什么是QQ那样的最小化而不是正常的最小化
最小化和关闭是在mousemove里执行吗
回复
踏平扶桑 2003-12-25
如果想在控件上面点右键出现普通标题栏的那些,关闭,最小化等等,只要做个菜单在控件上点右键时调用就行了
回复
danielinbiti 2003-12-25
bordstyle=1,
用回调处理最小化和关闭
回复
qj82715 2003-12-25
Form1.WindowState = 1 最小化

Form1.WindowState = 2 最大化

拖动窗体,用picture控件代替标题栏
Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
If Button = 1 Then
ReleaseCapture
SendMessage hwnd, WM_NCLBUTTONDOWN, HTCAPTION, 0&
End If

End Sub

'======拖动窗体的api和常量======
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 Any) As Long
Public Const HTCAPTION = 2
Public Const WM_NCLBUTTONDOWN = &HA1
回复
发动态
发帖子
VB基础类
创建于2007-09-28

7453

社区成员

VB 基础类
申请成为版主
社区公告
暂无公告