How to pass data between two forms?
(Monday, January 31, 2005)
Found the following interesting discussion in the Newsgroups:
How to pass data between two forms? by:Anonymous
| Hi..
I have an application in which i have two forms. Form1 and form2.
Am able to pass the data to form 2. The below is the code snippet am using.
Private Sub directorytree_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles directorytree.DragDrop
Dim otherForm As New frmmnuAction(Me) ' Calling frmmnuactions to give user options.
otherForm.Show() ' otherForm is an instance of frmMnuActions MsgBox(otherForm.Mnuaction.Text) '<------------- Wait till the above process completes.
'Display the Value From Form2 and then go to Exit Sub
Exit Sub
Now Form2 displays. The problem now for me is that.
I want to wait till I get a value back from form2 to the message box in Form1. And the Exit the directorytree_DragDrop
Please Help..
-- ..NetHelpWanted
| | | Reply: by:Ken Tucker [MVP]
| | | Hi,
Use ShowDialog to show the form instead of show
Ken -- Outgoing mail is certified Virus Free. Checked by AVG Anti-Virus (http://www.grisoft.com). Version: 7.0.230 / Virus Database: 263.3.0 - Release Date: 6/12/2004
|
Posted by Xander Zelders

|
0 Comments:
Post a Comment
<< Home