4
Contributors
5
Replies
6
Views
6 Years
Discussion Span
Last Post by sandeepparekh9
0

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()
0

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.

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.