Public Class Form1 Private Sub OpenDialogButton_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim dialog As MyDialog = New MyDialog dialog.Param1 = Me.TextBox1.Text If dialog.ShowDialog(Me) = Windows.Forms.DialogResult.OK Then Me.TextBox1.Text = dialog.Param1 End If End Sub End Class Public Class MyDialog Private _param1 As String Public Property Param1() As String Get Param1 = Me._param1 End Get Set(ByVal value As String) Me._param1 = value End Set End Property Private Sub MyDialog_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load Me.TextBox1.Text = Me._param1 End Sub Private Sub CloseDialog_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles acceptButton.Click Me._param1 = Me.TextBox1.Text End Sub End Class