Click here to Skip to main content
16,021,211 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to set Form Size using SizeF and how to set Location of PicherBox Using PointF in c#
Posted

1 solution

The question doesn't make sense. The form size if of the type System.Drawing.Size, not SizeF, so act accordingly. Please see:
http://msdn.microsoft.com/en-us/library/25w4thew.aspx[^],
http://msdn.microsoft.com/en-us/library/system.drawing.size.aspx[^].

—SA
 
Share this answer
 
Comments
recoverinfotech 5-Mar-13 18:10pm    
Sir it About System.Drawing.SizeF AND System.Drawing.PointF Cos in my current project i need to convert form size PX to millimeter .
So i need to set form size in Flote point . plz Give me some sajesan How to do it
Sergey Alexandrovich Kryukov 5-Mar-13 18:21pm    
Apparently, it depends on resolution. For a printer, you know the resolution, so you get integers by using (int)Math.Round(someValue).
For a form on screen, all the API is abstracted from the physical screen size, every measure is set up in pixels only. This way, making makes no sense.

There is a tradition or a standard considering "standard" resolution of 72 points per inch for a screen, but this standard is hard to consider seriously, other than idiotic legacy. I would ignore the problem.

Is it clear?
—SA
recoverinfotech 5-Mar-13 18:26pm    
ok got it thanks
Sergey Alexandrovich Kryukov 5-Mar-13 18:30pm    
Great. Will you accept the answer formally (green button)? — thanks.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900