"The code is exactly
how I would like to write code and the algorithms used are very
efficient and well-documented."
Van T. Dinh, Microsoft MVP
|
|
Module: modVB_Forms
Routines to enhance the behavior and features of VB forms
|
Procedure Name
|
Type
|
Description
|
|
(Declarations)
|
Declarations
|
Declarations and private variables for the modVB_Forms module
|
|
CenterForm
|
Procedure
|
Centers the form on the screen.
Generally this function is called from the Load event of a form. See also the CenterForm method of the CFormPos class.
|
|
DisableCloseMenu
|
Procedure
|
Grays out the Close item on the form's system menu.
Since the user will not be able to close the form with the system menu or the 'X' close button on the title bar, your application will have to provide another way to close the form.
|
|
FormOnTop
|
Procedure
|
Sets the form's style to be always on top, or to remove the always on top style
|
|
GetFormNamed
|
Procedure
|
Retrieves a reference to form based on a string name.
This procedure may be used to assign a specific loaded form that is already in the Forms collection to a form variable.
|
|
LoadFormByName
|
Procedure
|
Loads a form by using a string variable containing the name of the form to avoid hard-coding form references.
In some table-driven applications, or in other situations, it may be desirable to determine the name of the form to load based on a passed string. Normally you must specify the name of the form explicitly in code in design mode when using the Load procedure, or the Show method of a form.
This procedure uses the Add method of the VB Forms collection to add a form based on a string name, such as "Form1", that you pass to it. The new form is also returned as a return value of the function.
Note: There is a known bug which causes the Forms.Add() method to fail when used in a compiled executable. This bug has been fixed in VB 6.0 Service Pack 3 or later. See Microsoft Knowledge Base article Q194912 for more information.
|
|
MakeTransparent
|
Procedure
|
Sets the form's style to be transparent.
Objects placed on the form are still visible, and it will still receive mouse and keyboard events.
This call should be made before the form is shown, for example in the Load event.
|
Overview of Total Visual SourceBook
The source code in Total Visual
SourceBook includes modules and classes for Microsoft Access, Visual
Basic 6 (VB6), and Visual Basic for Applications (VBA) developers. Easily
add this professionally written, tested, and documented royalty-free code
into your applications to simplify your application development efforts.
Additional Resources
|
|