Hello Jason,
Thanks for using Microsoft Newsgroup Support Service, my name is Ji Zhou
[MSFT] and I will be working on this issue with you.
I have tried to but cannot reproduce your issue on my side. From your
codes, I think the logical is, every time the Timer's elapsed event fires,
we call the Check_For_Version_Update() function. From the
Check_For_Version_Update() function, we judge a condition statement, and
determine whether to call Notification() function. In the Notification()
function, we show our balloon tip, right?
For I do not see your codes in the Check_For_Version_Update() function. I
write my simulated version to test on my side. The whole codes are as
follows,
Public Class Form1
Dim WithEvents tmrUpdateCheckTimer As System.Timers.Timer
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
tmrUpdateCheckTimer = New System.Timers.Timer()
tmrUpdateCheckTimer.Interval = 3000
tmrUpdateCheckTimer.Enabled = True
End Sub
Private Sub tmrUpdateCheckTimer_Elapsed(ByVal sender As Object, ByVal e
As System.Timers.ElapsedEventArgs) Handles tmrUpdateCheckTimer.Elapsed
'When this timer event is triggered, check for updates and notify
the user.
'Disable the timer for the rest of the session.
Me.tmrUpdateCheckTimer.Enabled = False
If My.Computer.Network.IsAvailable Then Check_For_Version_Update()
End Sub
Private Sub Check_For_Version_Update()
Dim findUpdateVersion = True
If (findUpdateVersion) Then
Notification("Test Title", "Test Body", "http://localhost")
End If
End Sub
Public Sub Notification(ByVal Title As String, ByVal Body As String,
Optional ByVal ActionURL As String = "")
Me.NotifyIcon.BalloonTipTitle = Title
Me.NotifyIcon.BalloonTipText = Body
If Len(ActionURL) 0 Then
NotifyIcon.Tag = ActionURL
Else
NotifyIcon.Tag = ""
End If
Me.NotifyIcon.Visible = True
Me.NotifyIcon.ShowBalloonTip(9)
End Sub
Private Sub NotifyIcon_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles NotifyIcon.Click
MsgBox("Clicked 2", MsgBoxStyle.OkOnly, "Test: Click Detection")
Call NotifyIcon_BalloonTipClicked(sender, e)
End Sub
Private Sub NotifyIcon_BalloonTipClicked(ByVal sender As Object, ByVal
e As System.EventArgs) Handles NotifyIcon.BalloonTipClicked
MsgBox("Clicked", MsgBoxStyle.OkOnly, "Test: Click Detection")
If Len(NotifyIcon.Tag.ToString) 0 Then
Dim myTargetURL As String = NotifyIcon.Tag.ToString
System.Diagnostics.Process.Start(myTargetURL)
Application.DoEvents()
End If
Me.NotifyIcon.Visible = False
End Sub
End Class
No matter I run the application within Visual Studio or deploy it and run
it at client machines. It always works as expected. The click event of
NotifyIcon and BallonTip fires OK. I can see the message box to pop up, as
well as the target site's launching. One important thing to be mentioned is
that, in the Notification() function, I have changed the codes
If Len(ActionURL) 0 Then NotifyIcon.Tag = ActionURL Else
NotifyIcon.Tag = ""
to
If Len(ActionURL) 0 Then
NotifyIcon.Tag = ActionURL
Else
NotifyIcon.Tag = ""
End If
Actually, without the End If statement, the NotifyIcon.Tag="" will always
be executed. So, at the later time, the target site will never be launched.
This may be problematical in the design logical, but I do not think it will
result into the message box's not poping up.
To do a future investigation on this issue and narrow down the problem,
would you mind to send me an setup msi file of your test project? So, I can
try to setup the application on my side, and run it to see what the problem
is there. You can access me by this email address, v-****@microsoft.com
Have a nice day!
Best regards,
Ji Zhou (v-****@online.microsoft.com, remove 'online.')
Microsoft Online Community Support
Delighting our customers is our #1 priority. We welcome your comments and
suggestions about how we can improve the support we provide to you. Please
feel free to let my manager know what you think of the level of service
provided. You can send feedback directly to my manager at:
ms****@microsoft.com.
==================================================
Get notification to my posts through email? Please refer to
http://msdn.microsoft.com/en-us/subs...#notifications.
Note: The MSDN Managed Newsgroup support offering is for non-urgent issues
where an initial response from the community or a Microsoft Support
Engineer within 1 business day is acceptable. Please note that each follow
up response may take approximately 2 business days as the support
professional working with you may need further investigation to reach the
most efficient resolution. The offering is not appropriate for situations
that require urgent, real-time or phone-based interactions or complex
project analysis and dump analysis issues. Issues of this nature are best
handled working with a dedicated Microsoft Support Engineer by contacting
Microsoft Customer Support Services (CSS) at
http://support.microsoft.com/select/...tance&ln=en-us.
==================================================
This posting is provided "AS IS" with no warranties, and confers no rights.