OpenNETCF 1.4 and Notification

R

RobertoCL

Hello
I try to port to VB.net this:
http://www.opennetcf.org/Forums/topic.asp?TOPIC_ID=389

id = new Guid("you guid here");
mynotify = new OpenNETCF.Notification.NotificationEngine(id);
//hook up events
mynotify.NotificationSelect +=new
OpenNETCF.Notification.NotificationEventHandler(mynotify_NotificationSelect);
mynotify.NotificationShow +=new
OpenNETCF.Notification.NotificationEventHandler(mynotify_NotificationShow);
mynotify.NotificationDismiss +=new
OpenNETCF.Notification.NotificationEventHandler(mynotify_NotificationDismiss)
private void mynotify_NotificationSelect(object sender,
OpenNETCF.Notification.NotificationEventArgs e)
{
textBox1.Text = "Notification Clicked ID:" + e.ID.ToString() + " Link:" +
e.Link.ToString();
}




Dim WithEvents noti As New OpenNETCF.WindowsCE.Forms.Notification

Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
AddHandler noti.BalloonChanged, AddressOf EHandler
End Sub

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button2.Click
noti.Caption = "Antención"
noti.InitialDuration = 5
noti.Text = "Nuevo mensaje<br>input type=button name='cmd:10' value='Ok'> "
noti.Visible = True
End Sub

Private Sub EHandler(ByVal sender As Object, ByVal e As
OpenNETCF.WindowsCE.Forms.BalloonChangedEventArgs)
Msgbox("Notification Clicked ID:" + e.XX + " Link:" + e.XX)
End Sub



But i don't know how call and show cmd:10 values, for example.
Any comment are welcome :)
 
R

RobertoCL

Solved!


AddHandler noti.BalloonChanged, AddressOf OnNotifyBubChange
AddHandler noti.ResponseSubmitted, AddressOf OnNotifyResponse

Protected Sub OnNotifyBubChange(ByVal obj As Object, ByVal e As
OpenNETCF.WindowsCE.Forms.BalloonChangedEventArgs)
MsgBox(e.Visible.ToString)
End Sub

Protected Sub OnNotifyResponse(ByVal obj As Object, ByVal e As
OpenNETCF.WindowsCE.Forms.ResponseSubmittedEventArgs)
MsgBox(e.Response.ToString)
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top