Reputation: 177
I've developed an application in fullscreen mode, i.e:
Imports System.IO
Public Class FormMain
Private Sub FormMain_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
Me.Location = New Point(0, 0)
Me.Size = SystemInformation.PrimaryMonitorSize
Me.StartPosition = FormStartPosition.WindowsDefaultLocation
End Sub
The line that opens the form without the menu bar is Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
, which makes me unable to drag and drop the application in the expanded screen.
I'm starting the application in my computer in the office, but the purpose is to show in the screen outside my room.
Thank you
Upvotes: 0
Views: 106
Reputation: 4809
Try this instead:
Me.Location = Screen.AllScreens(1).WorkingArea.Location
Me.StartPosition = FormStartPosition.Manual
Me.FormBorderStyle = FormBorderStyle.None
Me.WindowState = FormWindowState.Maximized
I would also suggest checking AllScreens
contains more than 1 element before setting it to that in case this app is ever run on a system that only has 1 screen.
Upvotes: 1