N/APosted on - 04/10/2015
I want to know what is the meaning of concatenation? What is the difference between integer and string data types? I would like to create a program in VB 2015 that will display the value of textbox and adding like Hello your name is—“ What are the controls I need to use to make this program work? What are the properties that I need to change at runtime to make it work? For the command, what are the declarations I need to provide to make this run successfully? Thank you!
Using variables at runtime and using concatenation
Concatenation is a word in computer programming meaning combining two entities or objects. This done by using “&” symbol and or “+” symbol. In this program you just need few controls.
2. 1 Textbox – name property set to “strName”
3. 1 Command button
Sample output window is shown below.
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
MsgBox("Hello " & strName.Text & " , welcome to Visual Basic.")
Explanations: In line number 5, it will show a message box with the message “Hello <name entered>, welcome to Visual Basic.” It is simple and very-near human explanation. If you’re going to read it using human language – display a message box that will show “hello” concatenated with value of strName.Text and “welcome to Visual basic.”