Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

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.

Posted

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.

Anybody looking for a graduate programmer (Midlands, England)?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...