RasPhoneBookDialog Class

DotRas SDK

Collapse image Expand Image Copy image CopyHover image
Displays the primary Dial-Up Networking dialog box. This class cannot be inherited.

Namespace: DotRas
Assembly: DotRas (in DotRas.dll) Version: 1.3.5166.33435 (1.3.0.0)

Syntax

C#
public sealed class RasPhoneBookDialog : RasCommonDialog
Visual Basic
Public NotInheritable Class RasPhoneBookDialog
	Inherits RasCommonDialog
Visual C++
public ref class RasPhoneBookDialog sealed : public RasCommonDialog
F#
[<SealedAttribute>]
type RasPhoneBookDialog =  
    class
        inherit RasCommonDialog
    end

Examples

The following example shows how to use the RasPhoneBookDialog component to display the main dial-up networking dialog box.
C# Copy imageCopy
RasPhoneBookDialog dialog = new RasPhoneBookDialog();
public void Begin()
{
    dialog.AddedEntry += new EventHandler<RasPhoneBookDialogEventArgs>(this.dialog_AddedEntry);
    dialog.ChangedEntry += new EventHandler<RasPhoneBookDialogEventArgs>(this.dialog_ChangedEntry);
    dialog.DialedEntry += new EventHandler<RasPhoneBookDialogEventArgs>(this.dialog_DialedEntry);
    dialog.RemovedEntry += new EventHandler<RasPhoneBookDialogEventArgs>(this.dialog_RemovedEntry);
    if (dialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
    {
        // The dialog has closed successfully.
    }
}
private void dialog_AddedEntry(object sender, RasPhoneBookDialogEventArgs e)
{
    // The dialog has added a new entry.
}
private void dialog_ChangedEntry(object sender, RasPhoneBookDialogEventArgs e)
{
    // The dialog has changed an entry.
}
private void dialog_DialedEntry(object sender, RasPhoneBookDialogEventArgs e)
{
    // The dialog has dialed an entry.
}
private void dialog_RemovedEntry(object sender, RasPhoneBookDialogEventArgs e)
{
    // The dialog removed an entry.
}
Visual Basic Copy imageCopy
Dim dialog As New RasPhoneBookDialog
Public Sub Begin()
    AddHandler dialog.AddedEntry, Me.dialog_AddedEntry
    AddHandler dialog.ChangedEntry, Me.dialog_ChangedEntry
    AddHandler dialog.DialedEntry, Me.dialog_DialedEntry
    AddHandler dialog.RemovedEntry, Me.dialog_RemovedEntry
    If (dialog.ShowDialog() = System.Windows.Forms.DialogResult.OK) Then
        ' The dialog has closed successfully.
    End If
End Sub
Private Sub dialog_AddedEntry(ByVal sender As Object, ByVal e As RasPhoneBookDialogEventArgs)
    ' The dialog has added a new entry.
End Sub
Private Sub dialog_ChangedEntry(ByVal sender As Object, ByVal e As RasPhoneBookDialogEventArgs)
    ' The dialog has changed an entry.
End Sub
Private Sub dialog_DialedEntry(ByVal sender As Object, ByVal e As RasPhoneBookDialogEventArgs)
    ' The dialog has dialed an entry.
End Sub
Private Sub dialog_RemovedEntry(ByVal sender As Object, ByVal e As RasPhoneBookDialogEventArgs)
    ' The dialog removed an entry.
End Sub

Inheritance Hierarchy

See Also