Some Ideas:
You can use the SystemInformation class, or the
System.Windows.Forms.Screen.GetBounds method.
You could get the size using the following code:
SystemInformation.PrimaryMonitorSize
Alternatively, you can get the Virtual Screen Size:
SystemInformation.VirtualScreen
The GetBounds method returns a rectangle containing the size of the screen:
System.Windows.Forms.Screen.GetBounds( new Point(0,0) ).Width
System.Windows.Forms.Screen.GetBounds( new Point(0,0) ).Height
You can use this type of information to determine how to size and position
your forms at runtime on different target PC's.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com
"Gidi" wrote:
Hi,
I finished my project, and i took the *.exe file and put it on my friend
computer.
when i started the program i was amazed to see that the form size is totaly
different then in my computer. i set the resolution to be the same as in my
computer, but still the forms looked bigger, a lot bigger...
My OS is XP Profesional and my Friend is XP Home Edition and we tried also
in WIn 98SE. is this something i can set on my application, is this a dll
problem?
What can I do???
One more thing, In my application, I used the PrintDocument class, and in
this case also, there is differnce between my printer and my friend's. how
can i set the page setting to be the same?
Thanks,
Gidi.