vb急急急~!! 关于form变形问题~~

来源:百度知道 编辑:UC知道 时间:2024/05/21 22:34:47
Form的Border用鼠标拖动窗口

text是的高为Form的2/3

Command的高是Form的1/3

如图,大概是这样了..新手,请大家帮帮忙~ 谢谢啦~

Private Sub Form_Resize()
Text1.Move 0, 0, ScaleWidth, ScaleHeight * 2 / 3
Command1.Move 0, Text1.Height, ScaleWidth, ScaleHeight * 1 / 3
End Sub

'ScaleWidth, ScaleHeight 是窗体内边框之间的可用宽度和高度

Private Sub Form_Resize()
Text1.Left = 0 + 50
Text1.Top = 0 + 50
Text1.Height = Form1.Height * 2 / 3 - 250
Text1.Width = Form1.Width - 200
Command1.Left = 0 + 50
Command1.Top = Text1.Top + Text1.Height + 50
Command1.Height = Form1.Height / 3 - 250
Command1.Width = Form1.Width - 200
End Sub

'为什么要加减个200或者20那那因为不加减就顶边了!