+3 votes
46 views
i have developed one stand alone application using windows form.when i use that application in another computer the application size is not fixed into the screen size. so i want to dynamically resize the windows form and also the controls which are exist in that windows form.can anyone help me..
asked May 12, 2016 in Computer Science - IT by gypsiii | 46 views

1 Answer

+2 votes
Best answer

I assume you want your application to be dynamic in every screen ratio in which software runs .

This can be done in several ways :

1. Determine screen size and allocate position to controls

if Screen.PrimaryScreen.Bounds.Width < 1366 then
 grd.Size = New Size(525, 172)
 grd.Location = New Point(30, 71)
End if

2. Dock the controls

3. Anchor the controls

4. Or dont allow user to maximize the screen and maintain a minimum screen size for forms

i.e , set as fixed:

5. There are third party controls which can resize all controls based on the screen size

answered May 12, 2016 by slow_learner
edited Oct 13 by slow_learner