GeekMasher
GeekMasher

Reputation: 1086

Can you run a VB application in full-screen?

I just want to ask: How do you get an application, using Microsoft Visual Basic 2010 express, to run in full screen mode. You know what I mean, like a game would but an application.

Is it possible? If not, tell me how and what I need to do it. Thanks.

Upvotes: 7

Views: 49247

Answers (3)

betrice mpalanzi
betrice mpalanzi

Reputation: 1117

The FormBorderStyle line is essential to show as full screen, so the top bar controls are not visible.

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

Upvotes: 2

Isuru
Isuru

Reputation: 31323

set the WindowState property to Maximized

Upvotes: 3

user806549
user806549

Reputation:

In your Form_load add the following two lines:

Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.WindowState = FormWindowState.Maximized

Obviously, you can place the code elsewhere than in form_load - and depending on your list of includes you may need more or less prepending.

Upvotes: 29

Related Questions