how to fix windows form size for different -2 resolution's screen ?? i have made windows form in 1380*700 resolution its fix for this screen when m running it in any other screen like mine 1280 *800 some of features are going beyond the screen ... i tried t with auto size ... anchor but cant resolve the prob any one can help please ???

Do not fix the form size. Set the window state to Maximized.
Use a unique panel to fill the form. If the form size is less than expected, you can fix the panel to the desired size (+ scroll-bars size if needed).
Put all your controls inside the panel.

Hope this helps

Yes set the window state to Maximized...

see i have uploaded 2 screen shots /// windows state maximized .... i ave take a panale .. inside the panale there are three button top middle and bottom .. but when i run form .. buttons are still in their place .. butons arere changing thier place according to the form size ... when i anchor buttons it sets only in particular coordinates (button,left ,bottom right,, top left top right ) but not in suitable place where i want ,,,,,, help me out with this .. with any video or pics demo please if you can :(

Use distinct anchorages for each button: Ie Button1 use top + left, Button 2 use bottom + left and Button 3 use top + righ

Hope this helps

As you said you work on 1380*700 resolution then try to set resolution programatically set resolution on start form and after exit application back to its normal resolution Click Here

Cheers

@bhagawatshinde: I didn't agree with your solution, because changing the primary screen resolution will affect to all other programs running, and, if the application throws an exception, the resolution would be changed back manually by the uiser.

More over, if the computer has more than one screen (sysinternals can mount 4 virtual desktops)(some video cards support more than one monitor attached in desktop extension mode)(the current screen is a virtual one like when using RDP or VNC), do you will change the screen resolution on all the 'primary' screens if the user moves the application window from one screen (or monitor) to another?

The point, IMO, is how to anchor and resize the controls depending on the current application main window size.

Let me know your opinion.

BR

let me know the solution please

As said before, you'll need to anchor the controls depending on the expected behaviour when resizing the application's window.

As an alternate way, on the form resize event, you can manually fix the size an position of each control depending on the current form size.

Also on this event, you can fix the min size of your application window.

Hope this helps

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.