窗体上有一个命令按钮Command1和文本框Text1,在文本框Text1中输入月份的数值

2025-01-04 15:58:43
推荐回答(1个)
回答1:

Private Sub Form_Load()‘LOAD初使化FORM
Command1.Left = Me.Width / 2 - Command1.Width / 2
Command1.Top = Me.Height / 2 - Command1.Height / 2 - 400
End Sub

Private Sub Form_Resize()’FORM大小改变
Command1.Top = (Me.Height - Command1.Height) / 2
Command1.Left = (Me.Width - Command1.Width) / 2-400
End Sub

要么人久写一个过程。去调用。

public sub Command_center()
Command1.Top = (Me.Height - Command1.Height) / 2
Command1.Left = (Me.Width - Command1.Width) / 2-400
end sub