VB 窗口中某控件改变大小时其他控件也按比例改变大小
Dim aa As BooleanPrivate Sub Form_Resize()
TreeView1.MousePointer = 9 '设鼠标类型
End Sub
Private Sub TreeView1_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
aa = True
End Sub
Private Sub TreeView1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
If aa = True Then
Text1.Left = TreeView1.Left + X
RichTextBox1.Left = TreeView1.Left + X
TreeView1.Width = RichTextBox1.Left - TreeView1.Left
End If
End Sub
Private Sub TreeView1_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
aa = False
End Sub
上述代码实现程序运行后,拖动treeview控件时,其他控件随着一起变换位置,但其他控件的大小不能变化,如何让其他控件大小也一起变化。请教各位。
[此贴子已经被作者于2018-12-20 20:34编辑过]