VB中怎样将命令按钮定位在窗体中央
5个回答
展开全部
Private Sub Form_Load()
Command1.Top = (ScaleHeight - Command1.Height) / 2
Command1.Left = (ScaleWidth - Command1.Width) / 2
End Sub
Private Sub Form_Resize()
Form_Load
End Sub
希望能帮助你
Command1.Top = (ScaleHeight - Command1.Height) / 2
Command1.Left = (ScaleWidth - Command1.Width) / 2
End Sub
Private Sub Form_Resize()
Form_Load
End Sub
希望能帮助你
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2015-06-26
展开全部
Private Sub Form_Load()
Command1.Top = (ScaleHeight - Command1.Height) / 2
Command1.Left = (ScaleWidth - Command1.Width) / 2
End Sub
Private Sub Form_Resize()
Form_Load。
Command1.Top = (ScaleHeight - Command1.Height) / 2
Command1.Left = (ScaleWidth - Command1.Width) / 2
End Sub
Private Sub Form_Resize()
Form_Load。
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
2009-03-12
展开全部
Private Sub Form_Load()
Command1.Left = (Form1.ScaleWidth - Command1.Width) \ 2
Command1.Top = (Form1.ScaleHeight - Command1.Height) \ 2
End Sub
Command1.Left = (Form1.ScaleWidth - Command1.Width) \ 2
Command1.Top = (Form1.ScaleHeight - Command1.Height) \ 2
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
直接在Resize编写就可以
Private Sub Form_Private Sub Form_Resize()
Command1.Top = (ScaleHeight - Command1.Height) / 2
Command1.Left = (ScaleWidth - Command1.Width) / 2
End Sub
Private Sub Form_Private Sub Form_Resize()
Command1.Top = (ScaleHeight - Command1.Height) / 2
Command1.Left = (ScaleWidth - Command1.Width) / 2
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
for i=1to3
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询