Sabtu, 25 Juli 2009

Visual Basic

Visual Basic (VB) is a computer programming language for the database.
Programming language commands are understood by the computer to perform certain tasks.
Visual Basic programming language, developed by Microsoft since 1991, preceding the development of the programming language BASIC (Beginner's All-purpose Symbolic Instruction Code) was developed in the era of the 1950s.
Visual Basic is a development tool that is a tool to create a variety of computer programs, especially those using the Windows operating system.
Visual Basic is a computer programming language that supports object (Object Oriented Programming = oop).

Menu Bar, used to select specific tasks such as save the project, open the project, etc.
Main Toolbar, is used to perform certain tasks quickly.
Project window, this window contains a description of all the modules that are in your applications. You can use the Toggle Folders icon to display the modules in the window in the sequential group or by name. You can use Ctrl + R to display the project window, or use the Project Explorer icon.
Form Designer window, this window is the place for you to design the user interface of your applications. So, this window-like canvas for a painter.
Toolbox window, this window contains the components you can use to develop the user interface.
Code window, is the place for you to write koding. You can display this window by using the combination Shift-F7.
Properties window is a list of properties that are currently selected object. For example you can change the color of any posts (foreground) and background color (background). You can use F4 to display the properties window.
Color Palette window, is the facility to quickly change the color of an object.
Form Layout window, showing how the form will be displayed during runtime.

Password characters (*)

You already know that on certain applications that use the password, a text box used to always display the password character asterisk (*) if you type something into it. This of course is that other people can not read the actual characters you type. To create a text box in order to remove the * characters (or even the other characters) is very simple, namely to fill in the characters you want on the property PasswordChar text box control. After that if you type something into the text box, the characters that appear are the characters you enter in the property is PasswordChar.

Center Screen

Often, if your application is run, set the application form on the monitor screen does not settle. Sometimes in the top left, sometimes in the middle, sometimes at the bottom. For you who like the tidiness, may feel this will annoy. It's a simple trick that form the application is always located in the middle of screen if executed, is to change the properties StartUpPosition a 2 - CenterScreen, or right-click on the image form Form Layout window, select Startup Screen Position Center

Adding a Control Array When Run-Time

Generally, we add controls to the form at the time of designing the form (at design time), but Visual Basic also provides a facility to increase the number of control array at run-time using the Load statement.

Example:

Create a form and add a Command Button. Change Indexnya properties with the number 0.

In the Command Button to add the program code, such as listing 2.

Listing 2. Click on Command1 Event

Private Sub Command1_Click (Index As Integer)

Load Command1 (1)

Command1 (1). Left = Command1 (0). Left

Command1 (1). Top = Command1 (0). Top + Command1 (0). Height

Command1 (1). Caption = "New Command"

Command1 (1). Visible = True

End Sub

Note that the procedure Command1_Click there Index As Integer parameter that should be added.

Run the application. If the Command Button is clicked, it automatically added a new Command Button right below it.

Nah, that tips and tricks on help you make your application with Visual Basic.

Tips n Tricks

Simple Tricks protect CD Collection | Tips Making Weakness Program | Password characters (*)
| Center Screen | Adding a Control Array When Run-Time

Contact Us

To contact us, you can ask via e-mail at khairul.annas @ gmail.com, or on annas_khairul@yahoo.co.id. Or you can also ask questions via YM! in: annas_khairul@yahoo.co.id

Thanks
Khairul Anas