17-10-12, 04:48 PM
كاتب الموضوع : AhmedEssawy
كود :
' ----------------------------------------
' Required Imports :
'
' System.Reflection
' System.IO
' Microsoft.VisualBasic
' Microsoft.WindowsCE.Forms
' System.Drawing
' ----------------------------------------
Private Sub sendNotfication(ByVal message As String)
' Set the Text property to the HTML string.
Notification1.Text = message
' Get the icon as an embedded resource.
' Note that icon must be added to project as an embedded resource.
Dim asm As System.Reflection.Assembly
asm = System.Reflection.Assembly.GetExecutingAssembly()
' Note that the name for the embedded resource
' is case sensitive and must match the file name.
Dim s As Stream = asm.GetManifestResourceStream("PocketPCApplication1.notify.ico")
Notification1.Icon = New Icon(s, 16, 16)
' If the notification is canceled, its icon remains
' available for later activating the notification.
Notification1.Caption = "Notification"
Notification1.Critical = False
' Initially display the notification for 10 seconds.
Notification1.InitialDuration = 10
Notification1.Visible = True
End Sub