Windows Develop Bookmark and Share   
 index > Windows Forms General > replacing windows form in a right place
 

replacing windows form in a right place

Hi guys

I have a windows application that shows a windows form. When you use a monitor that is 17" or higher is placed there it should be, but if you use a monitor less than 17" you see just half of the windows form,

How can i replace windows form regarding to monitor.?

thanks
Medes_  Sunday, May 14, 2006 11:33 AM

Check out the System.Windows.Forms.Screen class. Specifically the static function Screen.GetBounds() method.

It returns a rectangle that gives you the bounds of the screen that your form is on (it can take account of multiple monitors if you want to).

Once you have the bounds of the screen, you can set the location and size properties of your form.

I haven't tried it myself but it looks like it should work.

Regards

Jero

JeroGrav  Sunday, May 14, 2006 11:51 PM

Check out the System.Windows.Forms.Screen class. Specifically the static function Screen.GetBounds() method.

It returns a rectangle that gives you the bounds of the screen that your form is on (it can take account of multiple monitors if you want to).

Once you have the bounds of the screen, you can set the location and size properties of your form.

I haven't tried it myself but it looks like it should work.

Regards

Jero

JeroGrav  Sunday, May 14, 2006 11:51 PM

You can use google to search for other answers

Custom Search

More Threads

• A MessageBox in multi-thread windowForm
• toolStripStatusLabel.Text doesn't update?
• Animated title bar icon in .NET (C#)
• How to change the Title Bar appearance??
• MSDE and distribution
• List of Generic Collections? Trees?
• Reports in Vb.net
• Container for objects where items can be hidden
• return control to main thread
• Sample project for Realtime Zoom with scrollbar