Hi,
I have made a project in windows form in visual studio community editon 15.
My all form was designed in 1024 x 768 resolution.
When I run setup on another pc or laptop the screen resolution does not matches.
If my clients using different resolution like 1600 x 1200 or 1600 x 900 or any other resolutions.
To solve this problem, i tried various codes in load page...but its not working properly.
Like Setting the System..WindowState property to FormWindowState.Maximized
OR
Form property Autosize = true, Form property Autosizemode=GrowAndShrink
OR
OR
OR
I attach two image for reference purpose. First is with 1024 x 768 resolution, second is with 1600 x 1200 resolution.
If possible please tell me the code to resize window form to fit all resolutions.
Thanks in advance
I have made a project in windows form in visual studio community editon 15.
My all form was designed in 1024 x 768 resolution.
When I run setup on another pc or laptop the screen resolution does not matches.
If my clients using different resolution like 1600 x 1200 or 1600 x 900 or any other resolutions.
To solve this problem, i tried various codes in load page...but its not working properly.
Like Setting the System..WindowState property to FormWindowState.Maximized
OR
Form property Autosize = true, Form property Autosizemode=GrowAndShrink
OR
VB.NET:
Me.Location = New Point(0, 0)
Me.Size = Screen.PrimaryScreen.WorkingArea.Size
VB.NET:
Dim h As Integer = Screen.PrimaryScreen.WorkingArea.Height
Dim w As Integer = Screen.PrimaryScreen.WorkingArea.Width
Me.ClientSize = New Size(w, h)
VB.NET:
Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width
Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height
If (intX < Me.Width) Then
Me.Width = intX
End If
If (intY < Me.Height) Then
Me.Height = intY
End If
If possible please tell me the code to resize window form to fit all resolutions.
Thanks in advance