I have been working on an applicatin that if the network connection is down the application's notification icon is supposed to show a balloon tooltip.
This application will also show the balloon tooltip when the network connection is re-established.
When the network connection is re-established the balloon tooltip shows like it's supposed, however, when the network connection is lost, the balloon tooltip won't show.
The part that doesn't work looks like this:
'If the previous network connection or ping was good and now isn't, show it
If BadPing = 1 Then
HeartbeatIcon.ShowBalloonTip(10000, "VPN Heartbeat", "Network Offline!", ToolTipIcon.Error)
End If
PingReplyText.Text += "Network Connection Offline!" + vbCrLf
BadPing = BadPing + 1
So the program is checking for network connectivity every 10 seconds via a timer control that this 'If' statement resides in. If I change the 'If' statement to fire when BadPing = 2 I seem to be okay and the balloon tooltip shows, any less and it won't do it.
For testing purposes I commented out the 'If' statement and ran the program and the balloon tooltip showed up every 10 seconds, but only after PingReplyText had displayed "Network Connection Offline!" twice.
I am testing loss of network connectivity in this case by disabling my network adapter in the control panel of Windows. Is there something going on that I am not aware of that could be causing the balloon tooltip not to show up in the first 10 seconds of network loss?