Notification.Text Property
Gets or sets the text for the message balloon.
Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in microsoft.windowsce.forms.dll)
Syntax
'Declaration
Public Property Text As String
'Usage
Dim instance As Notification
Dim value As String
value = instance.Text
instance.Text = value
public string Text { get; set; }
public:
property String^ Text {
String^ get ();
void set (String^ value);
}
/** @property */
public String get_Text ()
/** @property */
public void set_Text (String value)
public function get Text () : String
public function set Text (value : String)
Not applicable.
Property Value
A string containing the HTML or plain text. The default is an empty string ("").
Remarks
The text can be plain text or HTML. The Pocket PC HTML control renders the HTML to be the best of its ability. The following elements are unsupported and ignored:
BGSOUND tag
images
meta tags
script
Use the Caption property to modify the title of the message balloon.
Example
The following code example creates an HTML string using a StringBuilder for the value of Text property. This code example is part of a larger example provided for the Notification class.
' Create the text for the notification.
' Use a StringBuilder for better performance.
Dim HTMLString As New StringBuilder()
HTMLString.Append("<html><body>")
HTMLString.Append("<font color=""#0000FF""><b>Data ready to download</b></font>")
HTMLString.Append(" <a href=""settings"">Settings</a>")
HTMLString.Append("<br><form method=""GET"" action=notify>")
HTMLString.Append("<SELECT NAME=""lstbx"">")
HTMLString.Append("<OPTION VALUE=""0"">Start now</OPTION><OPTION VALUE=""1"">In 1 hr</OPTION>")
HTMLString.Append("<OPTION VALUE=""2"">In 2 hrs</OPTION><OPTION VALUE=""3"">In 3 hrs</OPTION>")
HTMLString.Append("<OPTION VALUE=""4"">In 4 hrs</OPTION></SELECT>")
HTMLString.Append("<input type=checkbox name=chkbx>Notify completion")
HTMLString.Append("<br><input type='submit'>")
HTMLString.Append("<input type=button name='cmd:2' value='Postpone'>")
HTMLString.Append("</body></html>")
' Set the Text property to the HTML string.
Notification1.Text = HTMLString.ToString()
// Create the text for the notification.
// Use a StringBuilder for better performance.
StringBuilder HTMLString = new StringBuilder();
HTMLString.Append("<html><body>");
HTMLString.Append("<font color=\"#0000FF\"><b>Data ready to download</b></font>");
HTMLString.Append(" <a href=\"settings\">Settings</a>");
HTMLString.Append("<br><form method=\"GET\" action=notify>");
HTMLString.Append("<SELECT NAME=\"lstbx\">");
HTMLString.Append("<OPTION VALUE=\"0\">Start now</OPTION><OPTION VALUE=\"1\">In 1 hr</OPTION>");
HTMLString.Append("<OPTION VALUE=\"2\">In 2 hrs</OPTION><OPTION VALUE=\"3\">In 3 hrs</OPTION>");
HTMLString.Append("<OPTION VALUE=\"4\">In 4 hrs</OPTION></SELECT>");
HTMLString.Append("<input type=checkbox name=chkbx>Notify completion");
HTMLString.Append("<br><input type='submit'>");
HTMLString.Append("<input type=button name='cmd:2' value='Postpone'>");
HTMLString.Append("</body></html>");
// Set the Text property to the HTML string.
notification1.Text = HTMLString.ToString();
Platforms
Windows Mobile for Pocket PC
The Microsoft .NET Framework 3.0 is supported on Windows Vista, Microsoft Windows XP SP2, and Windows Server 2003 SP1.
Version Information
.NET Compact Framework
Supported in: 2.0
See Also
Reference
Notification Class
Notification Members
Microsoft.WindowsCE.Forms Namespace