Public Partial Class Form1
Public Sub New()
InitializeComponent()
self_ = Me ' ここでオノレをセット
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
Dim form2 As New Form2()
form2.Show()
End Sub
Private Shared self_ As Form1
' read-onlyならまぁ、実害もなかろうと。
Public ReadOnly Property GlobalValue() As String
Get
Return self_.TextBox1.Text
End Get
End Property
End Class
Public Partial Class Form2
Public Sub New()
InitializeComponent()
End Sub
Private Sub Button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles Button1.Click
TextBox1.Text = Form1.GlobalValue ' ここでもらう。
End Sub
End Class