you need to modify the New() constructor of the ' other ' forms or classes
eg:
VB Code:
Public Class Form2
Inherits System.Windows.Forms.Form
#Region " Windows Form Designer generated code "
'/// this will be used to access it...
Private frmMain As Form1
Public Sub New(ByVal f As Form)
MyBase.New()
frmMain = DirectCast(f, Form1)
'This call is required by the Windows Form Designer.
InitializeComponent()
'Add any initialization after the InitializeComponent() call
End Sub
'/// rest of Form2's stuff here...
'/// then on a sub ( ie: a button click ) ...
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
'/// pass some data to Form1 ( the main form )
frmMain.TextBox1.Text = "some stuff passed to Form1 !!!"
End Sub
to create Form2 ( from form1 when launching it ) ...
VB Code:
'/// when creating Form2 you can now pass the main form ( ie: this form ) as part of the constructor.
Dim frm2 As New Form2(Me)
frm2.Show()