This documentation is archived and is not being maintained.

Notification.ResponseSubmitted Event

Occurs when the user clicks a button or link in the message balloon.

Namespace: Microsoft.WindowsCE.Forms
Assembly: Microsoft.WindowsCE.Forms (in microsoft.windowsce.forms.dll)

Public Event ResponseSubmitted As ResponseSubmittedEventHandler
Dim instance As Notification
Dim handler As ResponseSubmittedEventHandler

AddHandler instance.ResponseSubmitted, handler

/** @event */
public void add_ResponseSubmitted (ResponseSubmittedEventHandler value)

/** @event */
public void remove_ResponseSubmitted (ResponseSubmittedEventHandler value)

JScript supports the use of events, but not the declaration of new ones.

This event occurs when the message balloon is dismissed by user input, but not when the InitialDuration time elapses.

This event is not raised if the Response property contains the name of a button or element in the format of "cmd:n", where n is any integer. These are special identifiers on the Pocket PC.

For more information about handling events, see Consuming Events.

The following code demonstrates using this event to process user interaction with the message balloon. This code example is part of a larger example provided for the Notification class.

' When a ResponseSubmitted event occurs, this event handler
' parses the response to determine values in the HTML form.
Private Sub OnResponseSubmitted(obj As Object, _ 
   resevent As ResponseSubmittedEventArgs) Handles Notification1.ResponseSubmitted
   ' Use a StringBuilder to create a log of the response.
   Dim LogResponse As New StringBuilder()
   ' If the response contains the name specified for the action value
   ' of the HTML form, in this case "notify," get the value of the
   ' selected option from the SELECT list. An example of the
   ' response string would be notify?lstbx=0.
   If resevent.Response.Substring(0, 6) = "notify" Then
      Dim choice As Integer = Convert.ToInt32(resevent.Response.Substring(13, 1))
      Select Case choice
         Case 0
         Case 1
            LogResponse.Equals("opt 1")
         Case 2
            LogResponse.Equals("opt 2")
         Case 3
            LogResponse.Equals("opt 3")
         Case 4
            LogResponse.Equals("opt 4")
      End Select
      ' If the checkbox in the form is checked, the response
      ' string could be as follows: notify?lstbx=0chkbx=on
      ' You can determine whether the check box is selected
      ' by checking whether the response ends with "on".
      If resevent.Response.EndsWith("on") Then
      End If
   ' If the user clicked the settings link,
   ' log the response. This example could display
   ' a dialog box by activating another form.
   ElseIf resevent.Response = "settings" Then
      ' Display a settings dialog by activating
      ' a form named 'Settings':
      ' Settings.Activate
      LogResponse.Equals("Postponed by clicking link")
      ' The user needs to respond to the notification
      ' after checking the settings, so set the
      ' InitialDuration and Visible properties so
      ' that the icon appears in the title bar.
      Notification1.InitialDuration = 0
      Notification1.Visible = True
   End If
   ' Display the response on the status bar.
   StatusBar1.Text = LogResponse.ToString() + " HTML: " + resevent.Response.ToString()
End Sub

  • Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see .

Windows Mobile for Pocket PC

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see System Requirements.

.NET Compact Framework

Supported in: 2.0