R
RSH
Hi,
i have a situation where I have a VB .Net Module built that contains all of
the functions I need. I now need to add a form to the project and i need
the form to sdisplay and the module code to write to the form. I am having
trouble figuring out how to do this.
Basically, I have Form1 which contains a button and a TextBox. Module1
contains a function called Function1. I want to attach an event to the
button which will call Function1 in the Module1 which in turn will display a
simple line of text to the TextBox on Form1
This is the code I have:
Sub in Module1...
Public Sub initialTest()
MessageBox.Show("hi")
Dim oForm = New Form1
oForm.RTB1.text = "Hi"
System.Windows.Forms.Application.DoEvents()
End Sub
Button Click in Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Module1.initialTest()
End Sub
The event is getting to Module1 and displaying the messagebox, but I get an
error "Public member 'TextBox' on type Form1 Not Found"
What needs to be done?
Thanks,
RSH
i have a situation where I have a VB .Net Module built that contains all of
the functions I need. I now need to add a form to the project and i need
the form to sdisplay and the module code to write to the form. I am having
trouble figuring out how to do this.
Basically, I have Form1 which contains a button and a TextBox. Module1
contains a function called Function1. I want to attach an event to the
button which will call Function1 in the Module1 which in turn will display a
simple line of text to the TextBox on Form1
This is the code I have:
Sub in Module1...
Public Sub initialTest()
MessageBox.Show("hi")
Dim oForm = New Form1
oForm.RTB1.text = "Hi"
System.Windows.Forms.Application.DoEvents()
End Sub
Button Click in Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Module1.initialTest()
End Sub
The event is getting to Module1 and displaying the messagebox, but I get an
error "Public member 'TextBox' on type Form1 Not Found"
What needs to be done?
Thanks,
RSH