'参考下面的例子,每次点击按钮后可以让窗体中的控件(按钮,图片框、label,textbox等)向右移动 Private Sub Command2_Click() Dim c As Control For Each c In Me.Controls c.Move c.Left + 100 Next End Sub
'参考下面的例子,每次点击按钮后可以让窗体中的控件(按钮,图片框、label,textbox等)向右移动 Private Sub Command2_Click() Dim c As Control For Each c In Me.Controls c.Move c.Left + 100 Next End Sub
Private Sub Command1_Click() Dim Contrl As Control For Each Contrl In Form1 Contrl.left= Contrl.left+100 Contrl.top=20 Next End Sub
Private Sub Command2_Click()
Dim c As Control
For Each c In Me.Controls
c.Move c.Left + 100
Next
End Sub
Private Sub Command2_Click()
Dim c As Control
For Each c In Me.Controls
c.Move c.Left + 100
Next
End Sub
Dim Contrl As Control
For Each Contrl In Form1
Contrl.left= Contrl.left+100
Contrl.top=20
Next
End Sub
放在 Frame 中,然后移动 Frame。