2个回答
展开全部
我也遇到同样问题。问过很多人,给的都不一样。这个最简单了。
代码如下:
将窗体的BorderStyle 属性设为0
ShowInTaskbar属性设为True
在窗体中添加一个按钮,以下是完整代码
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
Private Const GWL_STYLE = (-16)
Private Const WS_SYSMENU =&H80000
Private Const WS_MINIMIZEBOX =&H20000
Private Const WS_MAXIMIZEBOX =&H10000
Private Sub Command1_Click()
Me.WindowState = 1
End Sub
Private Sub Form_Load()
Dim lStyle As Long
lStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
lStyle = lStyle Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX Or WS_SYSMENU
SetWindowLong Me.hwnd, GWL_STYLE, lStyle
End Sub
详细请采纳!
代码如下:
将窗体的BorderStyle 属性设为0
ShowInTaskbar属性设为True
在窗体中添加一个按钮,以下是完整代码
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
Private Const GWL_STYLE = (-16)
Private Const WS_SYSMENU =&H80000
Private Const WS_MINIMIZEBOX =&H20000
Private Const WS_MAXIMIZEBOX =&H10000
Private Sub Command1_Click()
Me.WindowState = 1
End Sub
Private Sub Form_Load()
Dim lStyle As Long
lStyle = GetWindowLong(Me.hwnd, GWL_STYLE)
lStyle = lStyle Or WS_MINIMIZEBOX Or WS_MAXIMIZEBOX Or WS_SYSMENU
SetWindowLong Me.hwnd, GWL_STYLE, lStyle
End Sub
详细请采纳!
网易云信
2023-12-06 广告
2023-12-06 广告
很高兴能回答您的问题。以下是一段针对“一对一消息组件”的描述,字数在200字左右:该组件支持用户之间的私密交流,让沟通更加直接和高效。通过它,您可以向特定对象发送消息,并实时查看消息状态,包括对方是否已读或未读。同时,该组件还支持富文本消息...
点击进入详情页
本回答由网易云信提供
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询