VBnet Sponsor - Compuware Corporation

 

VB5/VB6 Callback Routines
Methods dealing with callbacks, enumeration and subclassing are for VB5/VB6 only.
Updated Saturday March 31, 2001
   
Category
Topic
Browse for
Folders

vb6
vb5
Browse for Folders Callback Overview
A discussion of the terms and requirements for providing the interface to a Browse for Folders callback routine.

Pre-selecting a Folder using the Browse Callback
Add a callback routine to your VB5 code to allow pre-selecting of a file system object when displaying the Browse for Folders dialog.



Dialogs
vb6
vb5
Centering the Open & Save Common Dialogs Using Callbacks
Add a Windows hook allowing centering of the dialog on-screen. June 07.2000

Centering the Open & Save Common Dialogs Using Callbacks, Advanced
Extend the dialog centering code to include other positioning options. June 07.2000

Hooking the Open & Save Common Dialogs To Manipulate Components
Find out how to change the captions of the dialog buttons and edit fields. June 07.2000

Modifying a Message Box with SetWindowsHookEx
Add a system hook and manipulate message box settings, including button captions. Feb 06.2001

Creating a VB-Timed Message Box with SetWindowsHookEx
Corrected - original February post contained code from the above method.
Create a custom messagebox that counts down and self-closes. Mar 24.2001

Creating an API-Timed Message Box with SetWindowsHookEx
Create a custom messagebox that counts down and self-closes without using a VB Timer control. Mar 24.2001



Locales
vb6
vb5
Obtaining a User's System Calendar Information
Use Enumeration callbacks to retrieve the month and days specific to the users locale. Aug 08.99

Changing the System Long and Short Date Formats with SetLocaleInfo
Now assure that systems always have the desired short and long date formats set. Aug 08.99

Obtaining a User's Regional Locale Date Settings with EnumDateFormats
Code to enumerate, via callbacks, the available locale time strings. May 16.99

Obtaining a User's Regional Locale Time Settings with EnumTimeFormats
Code to enumerate, via callbacks, the available locale time strings. May 16.99

Retrieving a User's Regional Locale Date Settings
Though not using callbacks, this obtains the national language locale settings for the user to retrieve strings representing times, dates, and other information. May 15.99



Display
vb6
vb5
Enumerating the Available Display Resolutions
Use this method to determine which resolutions a system supports. Sep 01.98

Changing the Display Resolution from Visual Basic
Use this routine to change the current screen resolution or depth. Sep 01.98



Files
vb6
vb5
Using CopyFileEx and Callback as a File Backup Mechanism
Backup app for NT that uses the CopyProgressRoutine callback to track file copy progress. Dec 20.99

 



Fonts
vb6
vb5
How to Enumerate the System Fonts using VB6/VB6
Based on the VB5 Help File example, this is the simplest code to enumerate the available Windows fonts using a callback and the Windows EnumFontFamilies API.

Enumerating the System Fonts by Type
Code to enumerate the available Windows fonts using a callback and the Windows EnumFontFamilies API, but populating the listbox only with fonts matching a desired type

Enumerating the System Fonts with Preview
This was just for fun ... code to enumerate the available Windows fonts using a callback and the Windows EnumFontFamilies API, populating the listbox with all fonts, and previewing the font at any size between 8 and 120 points.

Populating a Font Menu and Splitting a Long Menu into Columns
How to populate a Fonts menu and specify column breaks to assure it remains on-screen.



ListView
vb6
vb5
Sorting ListView ListItems Using Callbacks
Use the AddressOf operator to add extended sorting functionality to ListView columns. Updated Mar 01.2000

 



MessageBox
vb6
vb5
Modifying a Message Box with SetWindowsHookEx
Add a system hook and manipulate message box settings, including button captions. Feb 06.2001

Creating a VB-Timed Message Box with SetWindowsHookEx
Corrected - original February post contained code from the above method.
Create a custom messagebox that counts down and self-closes. Mar 24.2001

Creating an API-Timed Message Box with SetWindowsHookEx
Create a custom messagebox that counts down and self-closes without using a VB Timer control. Mar 24.2001



System
vb6
vb5
Enumerating the Installed and Supported System Locales
Retrieve the codepage language names and abbreviations using the EnumSystemLocales callback. Nov 09.99

 



Windows
vb6
vb5
Enumerating and Restoring Windows
Using EnumWindows to obtain window information, and provide a means to restore the window regardless of its window position. Mar 01.2000

Enumerating Windows Using Callbacks
Another Enumxxx API, this one enumerates system windows using AddressOf.  June 17.98

EnumWindows and EnumChildWindows Callbacks
Using EnumWindows and EnumChildWindows.  Jan 26.2000

Modifying a Message Box with SetWindowsHookEx
Add a system hook and manipulate message box settings, including button captions. Feb 06.2001 



   

VBnet Sponsor - Compuware Corporation

Copyright ©1996-2001 ebirch ltd/VBnet and Randy Birch. All Rights Reserved.  Terms of Use