Hi All,
Can anyone throw idea to make the form as Resolution Independent?
Thanks..
Hi,
I think the best way is to create an application in the most common resolution and that's 800x600. The raison for that is to handle smaller rsolutions and then resize it based on the screen object.
You can try then this paart of code:
Dim h, w As Integer
h = Screen.PrimaryScreen.WorkingArea.Height
w = Screen.PrimaryScreen.WorkingArea.Width
Me.Width = w
Me.Height = h
Me.CenterToScreen()
or
Dim h, w As Integer
h = Screen.PrimaryScreen.Bounds.Height
w = Screen.PrimaryScreen.Bounds.Width
Me.Width = w
Me.Height = h
Me.CenterToScreen()
Hi LUC001,
This makes the form to ocupy complete screen. i have MDI parent form
and i want my child form to fit within the boundaries of it.
Thanks for any help on this.
Hi,
How did you created your MDI application and do you open a ChildForm?
See if this helps.
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Me.IsMdiContainer = True
Dim mdiForm As New Form
mdiForm.MdiParent = Me
'///////////////////
mdiForm.WindowState = FormWindowState.Maximized '// Maximize the MDI Form.
'///////////////////
mdiForm.Show()
End Sub
End Class
you should use Docking, Anchoring Properties of the controls.
see here: http://www.codeproject.com/KB/vb/pflvb7.aspx
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.