September 26, 200718 yr Hello!I want to make an application for my network computers. I want to make they ping my server and return a balloon notifying pinging success/failure. This is almost done, but here comes the issue; When the application starts, I have a "pinging..."window. I want to hide this one when pinging attempt finishes, and I want to maintain notification icons on my systray. But the window does not hide with the Me.Hide command, or if I enter the Me.Close command, notification icons also disappear. Can somebody tell me what's wrong?Here's my code: Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load NotifyIcon1.ShowBalloonTip(10000) If My.Computer.Network.Ping("192.168.0.1", 5000) Then NotifyIcon1.Visible = False ntfSuccess.Visible = True ntfSuccess.ShowBalloonTip(10000) Me.Hide() Else NotifyIcon1.Visible = False ntfFailure.Visible = True ntfFailure.ShowBalloonTip(10000) Me.Hide() End If End SubThanks in advance! Edited September 26, 200718 yr by ShinIori319
September 26, 200718 yr You can't hide the window during Form_Load using Me.Hide(), try moving all the code to Form_Shown instead. If it's because you never want the form to be shown at all, then try setting the form's visible property to false during design-time.
Create an account or sign in to comment