2008/01/09(Wed) 14:57:54 編集(投稿者)
■No12406 (マルコ さん) に返信
Public Class 入力画面
Inherits System.Windows.Forms.Form
#Region " Windows フォーム デザイナで生成されたコード "
(省略)
#End Region
Private Sub 参照ボタン_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 参照ボタン.Click
Dim frm As New 照会画面
frm.ShowDialog()
If frm.DialogResult = DialogResult.OK Then
Me.txt項目.Enabled = True
Else
Me.txt項目.Enabled = False
End If
frm.Dispose() 'ShowDialog の場合に必要
End Sub
End Class
Public Class 照会画面
Inherits System.Windows.Forms.Form
#Region " Windows フォーム デザイナで生成されたコード "
(省略)
#End Region
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Me.DialogResult = DialogResult.OK
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
Me.DialogResult = DialogResult.Cancel
End Sub
End Class