我不知道在设计表单我设置的中心对象,并设置properity到汽车中心做,但在形式上视图时最大限度的表单对象到表格的左上方, 谁能帮帮我,好吗?
I do not know in designing forms I set objects in center of and set the properity to auto center, but in form view when maximize the form objects go to the top left of the form, Can anyone help me,Please?
接入形式有一个在调整大小
活动,您可以在表单上调整各种控件的水平位置通过基于窗体本身的 .WIDTH
属性操纵它们的。左
属性。
Access forms have an On Resize
event where you can adjust the horizontal location of various controls on the form by manipulating their .Left
properties based on the .Width
properties of the form itself.
举例来说,假设我有一个 BUTTON0
命名的命令按钮的形式。为了保持它(或多或少)水平居中时调整窗口的大小,我可以使用下面的code。在表格的在调整大小
事件:
For example, say I have a form with a Command Button named Button0
. To keep it (more or less) centered horizontally when the window is resized, I can use the following code in the Form's On Resize
event:
Private Sub Form_Resize()
'' adjust the horizontal position of the Command0 button
Me.Command0.Left = (Me.InsideWidth - Me.Command0.Width) / 2
End Sub