Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding form on Minimize

Status
Not open for further replies.

Ddraig

MIS
Jul 16, 2004
97
US
Howdy,

I was wondering if anyone could give me an idea of what I'm doing wrong. I guess I need to know what Form Event this code should be in.

Me.ShowInTaskbar = False
Me.Hide()

I want to hide a form when someone clicks the minimize button. I have a notifyMenu with the following code to allow for double click show and hide.

If Me.Visible = True Then
Me.ShowInTaskbar = False
Me.Visible = False
Me.Hide()
Else
Me.ShowInTaskbar = True
Me.Visible = True
Me.Show()
End If
 
Code:
Private Sub Form4_SizeChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles MyBase.SizeChanged
        If Me.WindowState = FormWindowState.Minimized Then
            Me.ShowInTaskbar = False
            Me.Hide()
        Else
            Me.ShowInTaskbar = True
        End If
    End Sub

Christiaan Baes
Belgium

I just like this --> [Wiggle] [Wiggle]
 
Awsome thanks,

I had to change my double click event but I think that works good. :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top