运行工程时,如何使各个窗体都居中显示在屏幕上?
求助:一个工程有多个窗体,运行时,各个窗体出现在屏幕上不同的位置
我该如何设置,才能在运行时,各个窗体都能居中显示在屏幕上?
谢谢!
呵呵。。。。用API函数也可以!
Public Declare Function SetWindowPos Lib "user32" Alias "SetWindowPos" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal x As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long