JoshK Posted April 18, 2006 Posted April 18, 2006 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. Quote
Cags Posted April 18, 2006 Posted April 18, 2006 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. Quote Anybody looking for a graduate programmer (Midlands, England)?
Administrators PlausiblyDamp Posted April 18, 2006 Administrators Posted April 18, 2006 Also http://www.xtremedotnettalk.com/showthread.php?t=83092 might be worth a read. Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
JoshK Posted April 18, 2006 Author Posted April 18, 2006 Yep, got it working, thanks that thread was very helpfull Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.