T
Thomas Hall
I'm using OpenNETCF.WindowsCE.Forms.Notification (SDF v.1.4) to provide
notification bubbles for certain app events. For some reason, the
notification icon is not being displayed in the system tray
notification area. I haven't specified one, so I expected the
application's 16x16 icon to be used.
Here's my code:
Private Sub StartNotifyEngine()
m_objNotifyBubble = New OpenNETCF.WindowsCE.Forms.Notification
End Sub
Private Sub StopNotifyEngine()
If Not (m_objNotifyBubble Is Nothing) Then
' Remove previous notification.
m_objNotifyBubble.Visible = False
m_objNotifyBubble = Nothing
End If
End Sub
Public Sub ShowNotifyBubble(ByVal strNotifyText As String, _
Optional ByVal strBubbleTitle As String = "New Message Received")
' Check for previous unanswered notification.
If m_objNotifyBubble.Visible Then
m_objNotifyBubble.Visible = False
End If
Dim sbHTML As New StringBuilder
With sbHTML
' Build HTML for bubble notification.
.Append("<html><body>")
.Append("<h3>")
.Append(strNotifyText)
.Append("</h3>")
.Append("<hr />")
.Append("<h4>")
.Append("Received at ")
.Append(Now.ToString)
.Append("</h4>")
.Append("<br><form method='POST'><input type=button
value='Close' name='cmdClose'></form>")
.Append("</body></html>")
End With
With m_objNotifyBubble
.Caption = strBubbleTitle
.Critical = False
.InitialDuration = 3600
.Text = sbHTML.ToString
.Visible = True
End With
End Sub
Private Sub OnBalloonChanged(ByVal sender As Object, _
ByVal e As OpenNETCF.WindowsCE.Forms.BalloonChangedEventArgs)
Handles m_objNotifyBubble.BalloonChanged
If Not e.Visible Then
m_objNotifyBubble.Visible = False
End If
End Sub
Private Sub OnResponseSubmitted(ByVal sender As Object, _
ByVal e As OpenNETCF.WindowsCE.Forms.ResponseSubmittedEventArgs)
Handles m_objNotifyBubble.ResponseSubmitted
m_objNotifyBubble.Visible = False
End Sub
Thanks in advance,
Thomas Hall
notification bubbles for certain app events. For some reason, the
notification icon is not being displayed in the system tray
notification area. I haven't specified one, so I expected the
application's 16x16 icon to be used.
Here's my code:
Private Sub StartNotifyEngine()
m_objNotifyBubble = New OpenNETCF.WindowsCE.Forms.Notification
End Sub
Private Sub StopNotifyEngine()
If Not (m_objNotifyBubble Is Nothing) Then
' Remove previous notification.
m_objNotifyBubble.Visible = False
m_objNotifyBubble = Nothing
End If
End Sub
Public Sub ShowNotifyBubble(ByVal strNotifyText As String, _
Optional ByVal strBubbleTitle As String = "New Message Received")
' Check for previous unanswered notification.
If m_objNotifyBubble.Visible Then
m_objNotifyBubble.Visible = False
End If
Dim sbHTML As New StringBuilder
With sbHTML
' Build HTML for bubble notification.
.Append("<html><body>")
.Append("<h3>")
.Append(strNotifyText)
.Append("</h3>")
.Append("<hr />")
.Append("<h4>")
.Append("Received at ")
.Append(Now.ToString)
.Append("</h4>")
.Append("<br><form method='POST'><input type=button
value='Close' name='cmdClose'></form>")
.Append("</body></html>")
End With
With m_objNotifyBubble
.Caption = strBubbleTitle
.Critical = False
.InitialDuration = 3600
.Text = sbHTML.ToString
.Visible = True
End With
End Sub
Private Sub OnBalloonChanged(ByVal sender As Object, _
ByVal e As OpenNETCF.WindowsCE.Forms.BalloonChangedEventArgs)
Handles m_objNotifyBubble.BalloonChanged
If Not e.Visible Then
m_objNotifyBubble.Visible = False
End If
End Sub
Private Sub OnResponseSubmitted(ByVal sender As Object, _
ByVal e As OpenNETCF.WindowsCE.Forms.ResponseSubmittedEventArgs)
Handles m_objNotifyBubble.ResponseSubmitted
m_objNotifyBubble.Visible = False
End Sub
Thanks in advance,
Thomas Hall