Hi All.![]()
I have the monitor of LCD. So when I will use this following code then my form is not on a screen centrally but in a bottom of the right corner of my screen.
VB Code:
Option Explicit Private Sub CenterForm(pobjForm As Form) With pobjForm .Top = (Screen.Height) / 2 .Left = (Screen.Width) / 2 End With End Sub Private Sub Form_Load() CenterForm Me ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' ' Me.Top = (Screen.Height) / 2 ' here the same ' Me.Left = (Screen.Width) / 2 ''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' End Sub
How to make it correctly? Thanks in advance




Reply With Quote