multiple forms

JoshK

Newcomer
Joined
Apr 12, 2006
Messages
10
Location
Akron, OH
I saw a post about this already but it was in c# so no I am asking for VB.NET

how can I do something like this


dim dialog as object

private sub go()
dialog = new frmdialog
end sub

private sub check()
msgbox(dialog.textbox1.text)
end sub

so I have a dialog box where someone can type something into textbox1, then when an event is triggered on frmMain I want to pop up a messagebox showing the contents of textbox1 from a different form.
 
Assuming dialog is a form object that is declared globally (i.e. outside of a method) you can use the exact code you posted.

EDIT:- Also the textbox value must be a public property in the dialog.
 
Back
Top