• Skip to main content
  • Skip to primary sidebar
  • Skip to secondary sidebar
  • Skip to footer

Computer Notes

Library
    • Computer Fundamental
    • Computer Memory
    • DBMS Tutorial
    • Operating System
    • Computer Networking
    • C Programming
    • C++ Programming
    • Java Programming
    • C# Programming
    • SQL Tutorial
    • Management Tutorial
    • Computer Graphics
    • Compiler Design
    • Style Sheet
    • JavaScript Tutorial
    • Html Tutorial
    • Wordpress Tutorial
    • Python Tutorial
    • PHP Tutorial
    • JSP Tutorial
    • AngularJS Tutorial
    • Data Structures
    • E Commerce Tutorial
    • Visual Basic
    • Structs2 Tutorial
    • Digital Electronics
    • Internet Terms
    • Servlet Tutorial
    • Software Engineering
    • Interviews Questions
    • Basic Terms
    • Troubleshooting
Menu

Header Right

Home » VB » Multiple Forms

What does the phrase standard code module mean

By Dinesh Thakur

1. When using multiple forms in a project, it is important for you to consider each sub procedure or function procedure that you create. If the procedure will be used in only one form, then it should be included in the code for that form module.

 

If, in fact, you will need to use the procedure in multiple forms, write the procedure in standard code module.

 

2. A standard code module is a Visual Basic file with extension .bas, which is added to project. Standard code module do not contain a form, only code .

 

3. Create a new standard code module by selecting the Add Module command on the project menu. Select module on the new tab of the add module dialog box and click open. A new code window titled module1 opens on the screen. Module is also added to project explorer.

 

4. Standard code module has a general declarations section and procedure, just like form module. You can declare a variable and procedure as you declare in form module.

 

difference between declaring a variable in the General Declaration section of a standard code module and declaring variable in the general declaration section of a form code module?

By Dinesh Thakur

The variables declared in the General declaration of the section of standard code module are global and can be accessed from any other module, if the variable is public.

 

The variables declared in the General declaration of the section of the form module are not global those can not be accessed from any where in the project.

The variables declared static in the standard code module are static while project is running.

 

List some of the items generally found in an About Box

By Dinesh Thakur

One type of additional form in a project is an About box, such as the one you find in most Windows programs in help menu.

 

Usually an about box gives you the name and version of the project as well as information about programmers or company.

About box typically holds labels and OK command button, and perhaps images, logs or shapes

 

What is a Purpose of Splash Screen

By Dinesh Thakur

Perhaps you have noticed the logo or window that often appears while program is loading. This initial form is called splash screen.

Professional applications use splash screens to tell the user that the program is loading and starting.

 

It can make a large application appear to load and run faster, since something appears on the screen while the rest of the application loads.

You can create your own splash screen or use the splash screen template included woth Visual Basic. In the add form dialog box, choose the Splash screen to add a new form; then modify the form as you need.

 

 

What is the Term Used for the First Form to Display in the Project

By Dinesh Thakur

The term used for the first form to display in the project is called start up object; this start up object might be a form or Main procedure.

 

When you begin execution with a Main Sub procedure, you must explicitly load and show each form. Usually splash screen is displayed as modeless so that the Load statement the project’s Main form is loaded, but not shown. The last actions performed by the screen form is to unload the splash screen and show the Main Form.

 

 

Different Startup Form After the Project has been Created

By Dinesh Thakur

The startup form is the first form created in a project. However, you can select a different form to be the startup form, or you can specify your own Main Procedure.

 

You after creating a project you can set the startup form by following steps given below:

 

Step1: Select Project Properties form the Project Menu of the project name in the project explorer window and choose Project Porperties.

 

Step 2: In the Project Properties dialog box, click on the general tab.

 

Step 3: Drop down the list for Startup Object and select Sub Main. The Main Sub procedure displays frmSplash and loads required form.

 

Step 4: Click on OK.

 

 

Explain how to include an Existing Form in a New Project

By Dinesh Thakur

Forms may be used in more than one project. You might want to use a form that you created for one project in a new project.

 

Each form is separate module, which is saved as separate file with an .frm extension. All information for the form resides in a file, which includes the code procedures and visual interface as well as property settings for controls.

To ad as existing form to a project, use the add Form command on the project menu and select Existing tab. You need to specify the location and name of the form where it can found.

Steps for adding a existing form:

Step 1: Select Add Form from the Project menu.

Step 2: In the Add Form dialog box, select the Existing Tab and locate the folder and select file desired.

Step 3: Click on Ok

This will add that for to your project and it will appear in the project explorer.

 

 

what do mean by Hide and Show form methods ? Give the syntax

By Dinesh Thakur

You can display a form with show method and Cancel a form with hide method use the hide method .When you want to make sure when form disappears.

 

 

Syntax:

 

<formname>.Show (Style)

 

Formname is name of form you which to display the optional style determines whether form will display model or modeless.value for style are of or modelless and for model default is 0.You can also use the VB intrinsic constants: vbModal and vbModeless.

 

When you display a form as model user must response to form in some way usually by clicking command button number other program code can execute until modal form has been reponsed for hidden.However, if you display modeless user may switch to another form without respond to form.

 

Example

 

 

frmSombody.show

frmSombody.show vdModal

frmSombody.show vdModeless

The hide method is similar to show method but it is used to remove from form screen

<formname>.hide

 

 

Difference Between Hide and Unload Form Methods

By Dinesh Thakur

i. hide method is used to remove the form from the screen.

ii.it does not get removed the memory location.

 

iii. Syntax:

<fromname>.hide

iv.Example:

frmSomebody.hide

v.unload method is used to unload the form.

vi.unload method remove the form from the memory.

vii.Syntax:

Unload.<Formname>

viii.Example:

Unload Me

 

 

Primary Sidebar

Visual Basic Tutorial

Visual Basic Tutorial

  • VB - File Types Purpose
  • VB - Events
  • VB - Ole
  • VB - Controls Properties
  • VB - Project Steps
  • VB - Pretest Vs Posttest
  • VB - IDE
  • VB - Record Set
  • VB - Common Dialog Box
  • VB - Val Function
  • VB - Sub Vs Function Procedure
  • VB - Terms
  • VB - User Interface Elements
  • VB - Objects and Modules
  • VB - Variable’s Scope
  • VB - Message Box
  • VB - Data Vs Data-bound Control
  • VB - Branching Statements
  • VB - Do/Loop and For-Next Loop
  • VB - Grid Control
  • VB - Error Types
  • VB - Looping Constructs
  • VB - Relational Vs Logical Operator
  • VB - Control Purpose

Other Links

  • Visual Basic - PDF Version

Footer

Basic Course

  • Computer Fundamental
  • Computer Networking
  • Operating System
  • Database System
  • Computer Graphics
  • Management System
  • Software Engineering
  • Digital Electronics
  • Electronic Commerce
  • Compiler Design
  • Troubleshooting

Programming

  • Java Programming
  • Structured Query (SQL)
  • C Programming
  • C++ Programming
  • Visual Basic
  • Data Structures
  • Struts 2
  • Java Servlet
  • C# Programming
  • Basic Terms
  • Interviews

World Wide Web

  • Internet
  • Java Script
  • HTML Language
  • Cascading Style Sheet
  • Java Server Pages
  • Wordpress
  • PHP
  • Python Tutorial
  • AngularJS
  • Troubleshooting

 About Us |  Contact Us |  FAQ

Dinesh Thakur is a Technology Columinist and founder of Computer Notes.

Copyright © 2025. All Rights Reserved.

APPLY FOR ONLINE JOB IN BIGGEST CRYPTO COMPANIES
APPLY NOW