Textbox To Label

Reply

Join Date: Aug 2005
Posts: 18
Reputation: Sharpy is an unknown quantity at this point 
Solved Threads: 0
Sharpy Sharpy is offline Offline
Newbie Poster

Textbox To Label

 
0
  #1
Aug 9th, 2005
I wish to if someone types something in a textbox that it shows up in a label..but on another form...so say in the textbox i type in "Sharpy" then "Sharpy" shows up on another form.
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 5
Reputation: mwaora is an unknown quantity at this point 
Solved Threads: 0
mwaora mwaora is offline Offline
Newbie Poster

Re: Textbox To Label

 
0
  #2
Aug 9th, 2005
thought this could help;
Private Sub Command1_Click()
Form2.Show
Form2.Text1.Text = Form1.Text1.Text
End Sub
Form1 has 2 controls, text1 and command1
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 18
Reputation: Sharpy is an unknown quantity at this point 
Solved Threads: 0
Sharpy Sharpy is offline Offline
Newbie Poster

Re: Textbox To Label

 
0
  #3
Aug 9th, 2005
doesn't help me sorry, I want it so when you type in a word in the Text Box and click on a button then it will show up in the next form
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 70
Reputation: w00dy is an unknown quantity at this point 
Solved Threads: 2
w00dy w00dy is offline Offline
Junior Poster in Training

Re: Textbox To Label

 
0
  #4
Aug 9th, 2005
Change this line:
Form2.Text1.Text = Form1.Text1.Text

to this:
Form2.Label1.Caption = Text1.Text

Or did you not want to use a command button?
You could try Text1_Change, instead of Command1_Click.

If you don't want Form2 to show at this point, then use "Load Form2" earlier, then you can Show or Hide it as you need to.

hope that helps, if not give us a little more explanation of what you want to do.
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 18
Reputation: Sharpy is an unknown quantity at this point 
Solved Threads: 0
Sharpy Sharpy is offline Offline
Newbie Poster

Re: Textbox To Label

 
0
  #5
Aug 9th, 2005
Thanks its working now
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 70
Reputation: w00dy is an unknown quantity at this point 
Solved Threads: 2
w00dy w00dy is offline Offline
Junior Poster in Training

Re: Textbox To Label

 
0
  #6
Aug 10th, 2005
Glad I could help
Reply With Quote Quick reply to this message  
Join Date: Jun 2005
Posts: 121
Reputation: jwshepherd is an unknown quantity at this point 
Solved Threads: 5
jwshepherd's Avatar
jwshepherd jwshepherd is offline Offline
Junior Poster

Re: Textbox To Label

 
0
  #7
Aug 16th, 2005
try using the text1.change() event That way it is automatically change whenever you type something
Visual Basic 4 / 5 / 6 Syntax (Toggle Plain Text)
  1. public Sub text1_change()
  2. form1.label1.caption = trim(text1.text)
  3. end sub
.: We may acquire liberty, but it is never recovered if it is lost :.
irc://irc.rizon.net/#itf
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC