Visual Basic

 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me



Go Back   Tutorialized ForumsDesktop ProgrammingVisual Basic

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Tutorialized Forums Sponsor:
  #1  
Old August 20th, 2010, 10:55 PM
vbboard vbboard is offline
Registered User
Tutorialized Newbie (0 - 499 posts)
 
Join Date: Aug 2010
Posts: 5 vbboard User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 28 m 19 sec
Reputation Power: 0
[TUT] Concatenation [/TUT]

Originally on my site: http://vb-board.com



Concatenation is pretty much the addition of strings. This is frequently used in many programs and also a very simple concept.

Here is an example:
1. Open a new project
2. Add one button and two textboxes
3. Double click your button and add this code:
Code:
 Dim strOne As String
        Dim strTwo As String
        strOne = TextBox1.Text
        strTwo = TextBox2.Text

        MessageBox.Show(strOne & " " & strTwo)


Explanation:
-If you didn't know dim is the same thing as "define" it defines your variables. We defined two different strings here (strOne and strTwo).
-We then set each string equal to a textbox. It is set to textbox1/2.TEXT because you are setting it equal to what was entered into the textbox.
-After defining variables we use messagebox.show (pretty much a pop up which you can add extra functions but I will not use those) and we are making it show strOne, a space, and strTwo.
-Notice we use the ampersand (&). This is what you use to connect any variable with anything in quotes. We connect what ever strOne is equal to, a space (between quotes is the space), and what ever strTwo is equal to.
-Run your application (F5) and enter "Hello" in the first textbox and "Bob" in the second. click your button and a messagebox should pop up saying "Hello Bob"


Mess around with random uses like this until you get the hang of it. Then keep moving forward in your Visual Basic Career

Reply With Quote
Reply

Viewing: Tutorialized ForumsDesktop ProgrammingVisual Basic > [TUT] Concatenation [/TUT]


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 

Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.

© 2003-2017 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap