Start Position - CenterScreen not really in the center

machinogodzilla

Active member
Joined
Mar 3, 2007
Messages
25
Programming Experience
Beginner
Hi!


I keep trying all possible tricks to make my form show in the centre of
the screen. But whatever I do it does not work! It does not work when
I choose it from properties and it does not work when I include a bit
of code myself.

My form appears everywhere but not in the centre. And the pain is that
it not only appears wherever it wants but also is usually half way on the
screen half out of it.

:confused:

Please help!


Regards, machinogodzilla
 
do you have any code the re-sizes the form, or gives the form a specific location (like the the Load or Activated events)?
 
No, nothing. To check that maybe something sneaked to the code cos it's
quite long I deleted section after section, procedure after procedure that
at the end there were only declarations left and no change whatsoever.
 
====>> [resolved] <<====

Hi!


As I said before, I erased everything until declarations. So today I caried
on with them too. And I ve found it !!! :)

VB.NET:
Dim Gauge As System.Drawing.Graphics = Me.CreateGraphics()
This global declaration that was never used after it was declared was
apparently the cause of trouble.


Thank you for your interest !


Best regards,
machinogodzilla
 
CreateGraphics usually is the cause of trouble...
 
Back
Top