Borderless Form System Menu

BrendanS

Member
Joined
Dec 9, 2006
Messages
8
Programming Experience
Beginner
Hi all,

How can a borderless form have it's system menu displayed when minimized in the taskbar?


Thank you for your time,

Brendan
 
When form is minimized there isn't a point to the form being borderless so you can set any border and the menu will work.
VB.NET:
    Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) _
    Handles Me.Resize
        If Me.WindowState = FormWindowState.Minimized Then
            Me.FormBorderStyle = Windows.Forms.FormBorderStyle.FixedSingle
        Else
            Me.FormBorderStyle = Windows.Forms.FormBorderStyle.None
        End If
    End Sub
 
Thank you for the responses.

TBryce311 - Excuse me if the question wasn't clear enough. I am using a borderless form so to have full control on it's appearance using various skins. In doing so, I have labels acting as Minimize and Close buttons. My problem was when the form is minimized, I could not close or restore the form via the form's system menu from the taskbar - as you can when a form's FormBorderStyle is set to FixedSingle etc.

JohnH - Thank you. A simple solution that completely flew over my head.
 
Back
Top