Starting Again with Visual Basic 2008

Visual Basic is very simple programming language. It can be learned by everyone even though from the beginning. Learning visual basic we only need serious and  patient. If we have already know about algorithm well, god willing it will be faster learning.

For the first time all we need to do is to know about the tool. Here, the tool that we’ll use is Visual Basic 2008 Express Edition. It’s free to use. We only need to download it directly form Microsoft.

Alright, Our first application is called Set_Get_Text. In this application we will learn several components : Button, MessageBox and TextBox and label. In this application we will also learn how to get text from a text box and display it through label or  Textbox even message box.

This is the interface view

this is the source code


Public Class Form1

Public nama

Public Sub getText()

nama = txtnama.Text

End Sub

Private Sub btOke_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btOke.Click

getText()

lblNama.Text = nama

End Sub

Private Sub BtMessage_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtMessage.Click

getText()

MessageBox.Show("Isi TextBox = " + nama, "Informasi", MessageBoxButtons.OK, MessageBoxIcon.Information)

End Sub

End Class

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: