문제

http://i.stack.imgur.com/3jq0F.png

As shown in the picture, I want my vb.net application to run minimized like that a show a pop-up when the minimize button is hit. Is there a way I can do that?

도움이 되었습니까?

해결책

Try this...

You can use the notifyicon control...Hide the form when it's minimized and show the notifyicon, otherwise, show the form and hide the notifyicon control...

Add notifyicon control

Add this code under the form resize event

 If Me.WindowState = FormWindowState.Minimized Then
     Me.WindowState = FormWindowState.Minimized
     NotifyIcon1.Visible = True
     NotifyIcon1.ShowBalloonTip(5, "System", "DoubleClick on the Icon to restore the application.", ToolTipIcon.Info)
     Me.Hide()
 End If

Under the doubleclick event of notifyicon control, add this code...

 Me.Show()
 Me.WindowState = FormWindowState.Maximized
 NotifyIcon1.Visible = False
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top