3个回答
2013-07-19
展开全部
无法去掉……
只能消除标题栏,即 BorderStyle=false
然后自己设置一个退出按钮,其单击事件为:
me.close
只能消除标题栏,即 BorderStyle=false
然后自己设置一个退出按钮,其单击事件为:
me.close
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-07-19
展开全部
'''以下代码是使关闭按钮变灰,即不可用状态。
Opton Explicit
Private Const MF_BYPOSITION = &H400&
Private Const MF_ENABLED = &H0&
Private Const MF_DISABLED = &H2&
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function EnableMenuItem Lib "user32" (ByVal hMenu As Long, ByVal wIDEnableItem As Long, ByVal wEnable As Long) As Long
Private Sub Form_Load()
Dim h As Long, l As Long
h = GetSystemMenu(hwnd, 0)
l = GetMenuItemCount(h)
EnableMenuItem h, l - 1, MF_BYPOSITION + MF_DISABLED
End Sub
'''如果需要简单的方法,可以是关闭按钮失效:
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
End Sub
Opton Explicit
Private Const MF_BYPOSITION = &H400&
Private Const MF_ENABLED = &H0&
Private Const MF_DISABLED = &H2&
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long, ByVal bRevert As Long) As Long
Private Declare Function GetMenuItemCount Lib "user32" (ByVal hMenu As Long) As Long
Private Declare Function EnableMenuItem Lib "user32" (ByVal hMenu As Long, ByVal wIDEnableItem As Long, ByVal wEnable As Long) As Long
Private Sub Form_Load()
Dim h As Long, l As Long
h = GetSystemMenu(hwnd, 0)
l = GetMenuItemCount(h)
EnableMenuItem h, l - 1, MF_BYPOSITION + MF_DISABLED
End Sub
'''如果需要简单的方法,可以是关闭按钮失效:
Private Sub Form_Unload(Cancel As Integer)
Cancel = 1
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2013-07-19
展开全部
最简单的办法。。就是设置无标题栏。。然后在上面用图片控件贴一个自己满意喜欢的标题栏样式。。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询