Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

form1.vb referenced from module1.vb

Status
Not open for further replies.

VBdan

Programmer
Aug 29, 2003
2
US
I am converting a VB6 program to VB.Net. I have a problem so
I have created a small program for just one part of the problem:

1) form1.vb called 'form1.vb'
2) a button on form1 called 'button1'
3) a textbox on form1 called 'textbox1'
4) an external source code moudule called 'module.vb'
5) a subroutine in module1.vb called 'send_message'

When I click on 'button1', it calls 'send_message' that
is in 'module1.vb'.

The only thing sub 'send_message' does is to put a
message in 'textbox1' on 'form1'.

In VB6, I would always put:

form1.textbox1.text = "In send_message"

But now in .Net, it does not work. How can I get it to do
this simple thing? My project is a lot more complicated
(as you might expect), and I have a lot of subs that do
interact with other form1 objects. If I can get this
figured out, I can handle the rest.

****************************************************
form1 code
****************************************************

Private Sub button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.Click
Call send_message()
End Sub


****************************************************
form1 code
****************************************************

Public Sub send_message()

' VB6 liked this, but not VB.Net

form1.textbox1.text = "In send_message"

End Sub

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top