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.

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
This article has been dead for over six months. Start a new discussion instead.