Enumeration Routines
Callbacks, enumerations, hooks and subclassing are for VB5/VB6 only.
Updated Monday December 26, 2011
   
Category
Topic
Display
vb6
vb5
ChangeDisplaySettings: Change Display Resolution
Use this routine to change the current screen resolution or depth. Sep 1.1998

EnumDisplaySettings: Enumerate Available Display Resolutions
Method to determine which resolutions a system supports. Modified from original code to support multiple-frequencies returned by NT4. Jun 04.1999

EnumDisplayDevices: Enumerating System Display Devices
Calling EnumDisplayDevices to obtain information about the display devices in a system. Mar 29.2002

EnumDisplayMonitors: Enumerating System Monitor Info
EnumDisplayDevices obtains monitor details in single or multi-monitor setups based on the monitor handle. Dec 30.2002



Fonts
vb6
vb5
SetMenuItemInfo: Menu Scroll a Standard VB Menu
Tame long menus by making them scrollable. Feb 16.2003

EnumFontFamilies: Enumerating Windows Fonts - Callback vs. VB Intrinsic Code
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.

EnumFontFamilies: Enumerating Windows 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

EnumFontFamilies: Enumerate Windows Fonts with Font 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.

SetMenuItemInfo: Create a Multi-Column Font Menu
How to populate a Fonts menu and specify column breaks to assure it remains on-screen.  (portions apply to VB4-32)



Locale Info
vb6
vb5
GetLocaleInfo: System Calendar Information
Use Enumeration callbacks to retrieve the month and days specific to the users locale. Aug 08.1999

SetLocaleInfo: Change System Long and Short Date Formats
Now system admins can ensure that systems always have the desired short and long date formats set. Aug 08.1999

EnumDateFormats: Regional Locale Date Settings
Code to enumerate, via callbacks, the available locale time strings. May 16.1999

EnumTimeFormats: Regional Locale Time Settings
Code to enumerate, via callbacks, the available locale time strings. May 16.1999

GetLocaleInfo: 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.1999



Network
vb6
vb5
NetLocalGroupEnum: Enumerate Local Groups
Retrieve the local groups on your NT/2000 workstation or server Apr 19.2001

NetLocalGroupEnum: Enumerate Local Groups and Descriptions
Retrieve the local groups and their descriptions on your NT/2000 workstation or server. Apr 19.2001

NetConnectionEnum: Enumerating Share Connection Information
Using the NetConnectionEnum API to list connections made to a shared resource on the server or connections established from a particular computer.  Jun 18.2001

NetShareEnum: Enumerating Shared Resources on Other Machines  
Find remote machine shares, connection type, comments and resolved path using NetShareEnum.  Jun 18.2001

EnumServicesStatus: Enumerate Local Machine Services
Basic code to call EnumServicesStatus to obtain the service list for the local machine. May 22.2001

EnumServicesStatus: Enumerate Local Machine Services and Status
Expanding on the above to add additional info returned from the EnumServicesStatus call. May 22.2001

EnumServicesStatus: Enumerate Local or Remote Machine Services and Status
Adding the NetServerEnum code, this allows viewing of services running on any NT system in the domain. May 22.2001

WNetEnumResource: Enumerating Local Network Resources
Obtain mapped drives on the local machine, and resolve local drive letters into the corresponding UNC path. Jun 26.2001

NetSessionEnum: Enumerate Sessions on a Server
Use NetSessionEnum to provide information about sessions established on a server. Jun 18.2001

NetServerEnum: Obtain Domain/Workgroup Servers and Machines
Calling NetServerEnum to retrieve the domain machine list. May 22.2001

NetServerEnum: Get Version Info for Domain/Workgroup Servers and Machines
Calling NetServerEnum with the SERVER_INFO_101 structure to retrieve domain machine and their OS version. May 22.2001

EnumServicesStatus: Enumerate Local or Remote Machine Services and Status
Adding NetServerEnum code, this allows viewing of services running on any NT system in the domain. May 22.2001

NetUserGetInfo: Enumerate the User List and Obtain User Info
Code to load a listbox with the users for a given PDC/BDC (or local NT machine), along with their USER_INFO_10 data.  Oct 30.2000


Ports
vb6
vb5
EnumPorts: Identify Windows' Available Ports
Find the installed ports on the specified machine. Sep 17.1999


Printers
vb6
vb5
AddPrinter: Add/Delete Local/Remote Printers using Existing Drivers
Simple code to add and delete a local or remote printer. Jun 22.2004

EnumPrinters: Enumerating Local and Network Printers
Determine the available printers. print servers, domains, or print providers using EnumPrinters for Win9x and NT. Sep 20.1999

EnumPrinterDrivers: Enumerate Print Drivers on Specific Printer Server
How to enumerate local and remote printers, and the files required by those printers. Valid for all versions of Windows. Feb 10.2003



Windows
vb6
vb5
EnumWindows: Enumerate (and Restore) a Window via Callback
Using EnumWindows to obtain window information, and provide a means to restore the window regardless of its window position. Mar 1.2000

EnumWindows: Enumerate Windows via a Callback
Another EnumX API, this one enumerates system windows using AddressOf. June 17.1998

EnumChildWindows: Enumeration of Parent and Child Windows via Callbacks
Using EnumWindows and EnumChildWindows. Jan 26.2000



 

 
 

PayPal Link
Make payments with PayPal - it's fast, free and secure!

 
 
 
 

Copyright 1996-2011 VBnet and Randy Birch. All Rights Reserved.
Terms of Use  |  Your Privacy

 

Hit Counter