Jump: Search:

Total Visual SourceBook

Total Visual SourceBook CD and Printed Manual

Microsoft Access 2007/2010 Version
is Shipping!

New features in Total Visual SourceBook for Access, Office 2007 and VB6

Supports Access/Office 2010 (32 bit), 2007, 2003, 2002, 2000, and
Visual Basic 6.0!

Also available for:
Access 97/95


View all FMS products for Microsoft AccessAll Our Microsoft Access Products

SourceBook Info:

Why SourceBook?

 

"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

 

 

 

 

 
Royalty free source code library modules for Microsoft Access, VB6, VBA, OfficeRoyalty free source code library modules for Microsoft Access, VB6, VBA, OfficeVBA and VB6 Source Code Library Download the free trial version of Total Visual SourceBook for Microsoft Access, Office, VB6 and VBA
Category: Microsoft Visual Basic 6 : Forms
Description: Working with Forms in VB6

Class: CFormPos

Form Position Handler class to perform various functions relating to the position of a form on a screen.

You may save a form's position to the Windows registry, and restore a form to its previously-saved position. You may center a form, or move it to a specified location. This class uses the Windows registry to store information about the forms. You may specify any location of the registry by specifying the location with the RegistryPath and RootKey properties.

Procedure Name

Type

Description

(Declarations) Declarations Declarations and private variables for the CFormPos class
Form Property Sets a pointer to the form whose location you want to save and restore (required)
RegistryPath Property Sets the path to use for the form position entries in the registry (defaults to SOFTWARE\ plus the value of App.Title)
RootKey Property Gets the current value of the RootKey used for the form position entries in the registry (defaults to fprkHKeyLocalMachine, or the "HKEY_LOCAL_MACHINE" root key hive of the registry)
SubKey Property Sets the SubKey to use for the form position entries in the registry. If not supplied, or set to "", the entries are stored in the root of the key indicated by the RegistryPath property.
CenterForm Method Centers the form on the screen
Class_Initialize Initialize Set initial values to defaults which may be overridden with property settings
Class_Terminate Terminate Release resources used by the class
RegistryGetKeyValue Private Returns a value from the system registry
RegistrySetKeyValue Private Sets a key value
RestoreForm Method Restores the form to the last-saved position stored by the SaveForm method. Use the fForceVisible argument to handle the case where the form position was saved at a high resolution, but the user then changed to a low-resolution.
SaveForm Method Saves the current position of the form to the Windows registry. This method stores the form's current Left, Top, Width, and Height values, along with its current WindowState property, to the Windows registry. The location where this value is saved is determined by the RootKey, RegistryPath and SubKey properties of the class.

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

Feedback

Contact Us  l   Web questions: Webmaster   l   Copyright © FMS, Inc., Vienna, Virginia
Celebrating our 26th Year of Software Excellence