Change background image
  1. What's up? I see you're viewing as a Guest. How about registering, it only takes like 2 minutes. This will enable you to do more on our forum and stay updated.

Getting Started

Discussion in 'PC Software' started by vettacossx-alpha, May 29, 2011.

Thread Status:
This thread is more than 180 days old.
  1. vettacossx-alpha

    vettacossx-alpha Midnight Mage Member

    Note that all the images in this tutorial taken from Visual Basic version 6.0.
    If you using other version of Visual Basic, the images that you will see may
    be a little different.

    Run the Visual Basic program. The first thing you see is:

    Figure 1
    [​IMG]

    Here you choose what is the kind of the program you want to create.
    For creating a simple Visual Basic program, choose the Standard EXE,
    and press the Open Button.

    (If Figure 1 is not the first thing you see when you run Visual Basic,
    choose from the Visual Basic menu File->New Project (Figure 2))

    Figure 2
    [​IMG]

    After you've clicked the Open button, you will see:

    Figure 3
    [​IMG]
    Look at the form with the title bar Form1.
    This is how your program will look like.
    Everything you will place on this form will appear in your program.
    As you can see, your form is currently empty.
    You didn't program anything yet, but lets run the program!

    Click on the Play button in the toolbar (Figure 4)

    Figure 4
    [​IMG]

    Now your program is running (Figure 5):

    Figure 5
    [​IMG]

    As you can see, the form is empty.
    You can move the form, minimize and maximize it.

    To stop the program from running, you can click on the Stop button
    in the Toolbar (Figure 6), or click the form's X button (Figure 7).
    It's very recommended that you will always close your programs using the
    form's X button instead of the Visual Basic Stop button.
    It's like shutting Windows From the Start button, instead of Pressing
    the Power button.

    Figure 6
    [​IMG]

    Figure 7
    [​IMG]
  2. vettacossx-alpha

    vettacossx-alpha Midnight Mage Member

    Learning about Properties
    Every component (form is component for example) has properties,
    that determine its look and its functioning.
    Properties can be the component color, width, height and more.

    To see the form properties, select from the menu View->Properties Window (Figure 8).


    Figure 8
    [​IMG]

    The properties window looks like this:

    Figure 9
    [​IMG]
    In the red circle you can see the component name:
    These are the properties of a Form, and the form's name is Form1.

    The column marked by the blue circle contains the form's properties names:
    The form has Name property, Appearance property AutoRedraw property, and more.

    The column marked by the black circle contains the form's properties values:
    The form's Name is Form1, The form's Appearance property is 1 - 3D, and so on.


    You can change the form's properties.
    For example, lets change the form's Caption property.
    What is the Caption property? The Caption is the text that appears on the
    Form's title bar.
    Right now the text that appears on the form's title bar is Form1 (Figure 5).

    To change the Caption property, simply click on the Caption property in the
    form's properties names column (Figure 10).

    Figure 10
    [​IMG]
    As you see, the current Caption is Form1.
    Delete the "Form1" text and type instead of it "Hello" (Figure 11).

    Figure 11
    [​IMG]
    Now run the program using the Play button (Figure 4).
    You will see that the text on the form's Title bar is Hello (Figure 12).

    Figure 12
    [​IMG]
    Try to change others properties:
    Change the form's BackColor property to change the form's background color,
    Change the Icon property to change the icon that appears on the form's title bar.
    You can try and change every property, and in this way learn what does it do.
Thread Status:
This thread is more than 180 days old.

Share This Page