Okay, here's the senario:
I want the form to hide when I click on the minimize button, then the notify icon will show up on the system tray. I have this piece of code:
(ntfLibSMS is the name of my notify icon)
Private Sub LibSMS_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
Try
If Me.WindowState = FormWindowState.Minimized Then
Me.WindowState = FormWindowState.Minimized
ntfLibSMS.Visible = True
Me.Hide()
End If
Catch ex As Exception
ErrorCodes.ErrorMessages("LibSMS_Resize()", ex.Message)
End Try
End Sub
It doesn't work. T_T The form hides, but the notify-icon didn't appear... Any suggestions? Do you have any idea how I could fix this?