Hey I got a form which has no form border style. The problem is, when I run my maximise code the form covers the whole screen including the start bar. Is there anyway around this?

Obviously when you click the form border's maximise button it fits nicely with the start bar but if I run this code...

Me.WindowState = FormWindowState.Maximized

it will fill up the screen.

Any Solutions?

Thanks

Here's a snippet that "simulates" maximizing form:

Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
' Do not maximize
Me.WindowState = FormWindowState.Normal
' Set location to upper left corner
Me.Location = New Point(0, 0)
' Resize so that the taskbar etc. stays visible
Me.Size = My.Computer.Screen.WorkingArea.Size

awesome, thanks. That worked a treat

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.