|
-
Mar 26th, 2007, 07:51 PM
#1
Thread Starter
New Member
Sharing info between forms
I have a question, I have to make a few programs for my class which I can't find decent documentation in my book for (ITT Tech, go figure)
Say I have my main form (Form1), when you press a button on form1, it opens a new form (form2) that has a text input box, you enter a number, it does its calculation and must send it's calculation to a label box in Form1. how do I do this? And does this work the same way for outputting it in a listbox (insted of a label box)?
-
Mar 26th, 2007, 09:01 PM
#2
Re: Sharing info between forms
do a forum search, this question is asked almost daily and has been answered over and over.
-
Mar 27th, 2007, 03:42 AM
#3
Fanatic Member
Re: Sharing info between forms
You can see my solution to this commom problem here:
http://www.vbforums.com/showthread.p...54#post2349054
Hope that helps.
Martin J Wallace (Slaine)
-
Mar 27th, 2007, 05:43 AM
#4
Registered User
Re: Sharing info between forms
vb Code:
'Write this code in form1, button1_click event
Dim frm As New Form2
frm.Show()
'Add a textbox and a command button in form2 and write the following code in form2 button_click event
Dim frm As New frmAddCtrl
frm.Show()
frm.Label1.Text = TextBox1.Text
Me.Hide()
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|