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:
  1. Option Explicit
  2.  
  3.   Private Sub CenterForm(pobjForm As Form)
  4.  
  5.            With pobjForm
  6.  
  7.                .Top = (Screen.Height) / 2
  8.  
  9.                .Left = (Screen.Width) / 2
  10.  
  11.           End With
  12.  
  13. End Sub
  14.  
  15. Private Sub Form_Load()
  16. CenterForm Me
  17.  
  18. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  19. '  Me.Top = (Screen.Height) / 2 ' here the same
  20. '  Me.Left = (Screen.Width) / 2
  21. '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
  22. End Sub

How to make it correctly? Thanks in advance