VB问题高手进!

来源:百度知道 编辑:UC知道 时间:2024/09/25 13:17:35
我想vb窗口的大小不能改变 ,只有最小化和关闭按钮。最大话按钮无效。
我想要简单点的代码。
我想要和QQ对话框那样,鼠标放在边缘都没有鼠标移动的指针。

设置Form属性:

BorderStyle:1 - Fixed Single
MinButton:True

不需要代码

form属性:
borderstyle=1
minbutton=true

Dim OldWidth As Integer
Dim OldHeight As Integer

Private Sub Form_Load()
'先在FORM的属性页内设置MasButton为False
OldWidth = Me.Width
OldHeight = Me.Height
End Sub

Private Sub Form_Resize()
On Error Resume Next
Me.Width = OldWidth
Me.Height = OldHeight
End Sub

可以这样
设(默认)
borderstyle=2
这样默认是
maxbutton=true
minbutton=true
只把maxbutton=true改为
maxbutton=false
即可