Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

How Do I...

 

1. Maximize a form on form load...

 

me.maxamize?

 

2. Expose the display properties.

 

1024 X 768??

 

Thanks

Brian

"Beer is proof that God loves us and wants us to be happy."

-Benjamin Franklin

  • *Experts*
Posted

1.

Me.WindowState = FormWindowState.Maximized

Why not set it in the designer if you do it on form load?

 

2.

Dim sc As Rectangle = Screen.PrimaryScreen.WorkingArea
'get the screen width
MessageBox.Show(sc.Width)
'get the screen height
MessageBox.Show(sc.Height)

 

:)

Posted

I can but I was wondering what the command was.

 

Thanks

Brian

"Beer is proof that God loves us and wants us to be happy."

-Benjamin Franklin

  • Leaders
Posted

you beat me mutant :p

   Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
       Me.WindowState = FormWindowState.Maximized
   End Sub

   Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
       MessageBox.Show(Screen.PrimaryScreen.Bounds.Width & "  " & Screen.PrimaryScreen.Bounds.Height)
   End Sub

was my example i was putting together.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...