Manage Programs


[Page 607 (continued)]

  1. Run a program from Visual Basic

     

    1.

    Click on the Start Debugging icon (right arrowhead) in the Toolbar.

    or

     

    1.

    Press F5.

    or

     

    1.

    Press Alt/D/S.


  2. [Page 608]
  3. Save the current program.

     

    1.

    Press Alt/F/L, or click the Save All icon (shows three diskettes) on the Toolbar.

  4. Begin a new program.

     

    1.

    Press Ctrl + N. (If the previous program has not been saved, Visual Basic will prompt you about saving it.)

    2.

    Check that Windows Application is highlighted.

    3.

    Optionally type a name for the program into the Name box.

    4.

    Press the OK button.

  5. Open a recent project.

     

    1.

    Press Alt/F/J.

    2.

    Click on a recent project, or press the corresponding number.

  6. Open a program stored on a disk.

     

    1.

    Press Ctrl + O.

    2.

    Navigate to the directory containing the program.

    3.

    Highlight the program.

    4.

    Click the Open button.

    5.

    Double-click on the file with extension vbprog.

    Note 1: In Step 1, if an unsaved program is present, Visual Basic will prompt you about saving it.

    Note 2: If neither the Form designer nor the Code window for the program appears, double-click on formName.vb in the Solution Explorer window.

  7. Change the name of a program. (Method I.)

     

    1.

    Click on Close Project in the File menu to close the program.

    2.

    Use Windows Explorer or My Computer to locate the program's folder and rename it with the new name.

    3.

    Open the program in Visual Basic.

    4.

    In the second Open Project dialog box, replace every occurrence of the old name with the new name.

    5.

    Double-click on the file with extension vbprog.

    6.

    Double-click on My project in the Solution Explorer.

    7.

    Type the new name into both the "Assembly name" box and the "Root namespace" box.

  8. Change the name of a program. (Method II.)

     

    1.

    Create a new program with the new name.

    2.

    Give the form the same name as the form in the program to be renamed.

    3.

    Without writing any code or placing any controls on the form, save the program with the new name.

    4.

    Close the program.


    [Page 609]

    5.

    Use Windows Explorer to locate the program with the old name, and Copy the two files having the extension .vb; that is formName.Designer.vb and formName.vb.

    6.

    Paste the two .vb files into the folder for the program having the new name.

    7.

    Delete the folder for the program having the old name.

  9. Use the Solution Explorer.

    Note: Just below the Solution Explorer title bar are five or six icons. The fourth and fifth icons are View Code and View Designer. If there are less than five icons present, click on the formName.vb item to make it active and all five or six icons will appear.

     

    1.

    Click on the View Code icon to see the Code window for the current program.

    2.

    Click on the View Designer icon to see the form for the current program.

    3.

    If the program has more than one form, click on the name of a form to make that form the active form.




An Introduction to Programming Using Visual Basic 2005
Introduction to Programming Using Visual Basic 2005, An (6th Edition)
ISBN: 0130306541
EAN: 2147483647
Year: 2006
Pages: 164

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net