Go Back  Xtreme Visual Basic Talk > Legacy Visual Basic (VB 4/5/6) > General > Copying Values of Textbox & Label.


Reply
 
Thread Tools Display Modes
  #1  
Old 06-12-2004, 01:13 PM
JaxaL's Avatar
JaxaL JaxaL is offline
Banned
 
Join Date: Mar 2004
Location: United Kingdom, LONDON
Posts: 288
Exclamation Copying Values of Textbox & Label.


I know how to copy the text in text1 but how do i copy the Text in Text1 AND the caption of Label1?

For example:

Code:
Text1.text = "This is the text in Text.1" Label1.Caption = "Label"

I can copy the text in text1 and the caption of Label1 induvidually... but thats not what i want.. i want to do it together..Wht do i put in the click event of a command button to copy First the Label caption THEN the text in text1? I have been trying to do it.. but it just dont work.. how do i sort this out?
Reply With Quote
  #2  
Old 06-12-2004, 02:14 PM
Volte's Avatar
Volte Volte is offline
Ultimate Contributor

Retired Leader
* Guru *
 
Join Date: Aug 2001
Posts: 5,343
Default

By "copy" do you mean to the clipboard?
Code:
Clipboard.SetText Text1.Text & vbCrLf & Label1.Caption
Reply With Quote
  #3  
Old 06-13-2004, 03:35 AM
an5w3r's Avatar
an5w3r an5w3r is offline
Senior Contributor
 
Join Date: Jan 2004
Location: Romania
Posts: 1,342
Default

Quote:
Originally Posted by JaxaL
I know how to copy the text in text1 but how do i copy the Text in Text1 AND the caption of Label1?

For example:

Code:
Text1.text = "This is the text in Text.1" Label1.Caption = "Label"

I can copy the text in text1 and the caption of Label1 induvidually... but thats not what i want.. i want to do it together..Wht do i put in the click event of a command button to copy First the Label caption THEN the text in text1? I have been trying to do it.. but it just dont work.. how do i sort this out?
try text1.text=label1.caption & " " & text1.text
__________________
Fully customizable and easy to use .NET WPF charting library http://www.SoftwareGFX.com
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Forum Jump

Advertisement:





Free Publications
The ASP.NET 2.0 Anthology
101 Essential Tips, Tricks & Hacks - Free 156 Page Preview. Learn the most practical features and best approaches for ASP.NET.
subscribe
Programmers Heaven C# School Book -Free 338 Page eBook
The Programmers Heaven C# School book covers the .NET framework and the C# language.
subscribe
Build Your Own ASP.NET 3.5 Web Site Using C# & VB, 3rd Edition - Free 219 Page Preview!
This comprehensive step-by-step guide will help get your database-driven ASP.NET web site up and running in no time..
subscribe
 
 
-->