Advertisement
2002VB Miscellaneous #17877

Center a form

This is, I think, the easiest way to center a form. It is the way reccomended by Microsoft and Microsoft Press. Just stick it into your form_load.

AI

AI 摘要: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.

源代码
original-source
Private Sub Form_Load
 Left = (Screen.Width - Width) \ 2
 Top = (Screen.Height - Height) \ 2
End Sub
原始评论 (3)
从 Wayback Machine 恢复