top of page
Blog posts
Search
Get key presses while VBA code is running using PeekMessage and TranslateMessage
The PeekMessage Windows API Function retrieves windows messages from a message queue. The TranslateMessage Windows API Function translates virtual-key messages into character messages.
2 days ago3 min read
Â
Â


Drawing individual pixels with the Windows API
This post demonstrates how to use the SetPixel and GetPixel Windows API Functions to set (and get) the colour of individual pixels on the surface of a UserForm.
Sep 232 min read
Â
Â


Get a list of all Fonts installed on a device using the EnumFontFamiliesEx Windows API Function
Get a list of all fonts (or font / character set combinations) on a device using the EnumFontFamiliesEx Windows API Function.
Sep 173 min read
Â
Â


Get graphics / display capabilities for a device using the GetDeviceCaps Windows API Function
The GetDeviceCaps Function provides information on the graphics / display capabilities (hence "Caps") of a device ... information such as the widths and heights of screens in millimetres or pixels; monitor resolution; numbers of available brushes, pens, colours and fonts; other detailed information relating to the GDI library that this Function is part of such as its ability to perform shading and its ability to draw certain types of curves.
Sep 42 min read
Â
Â


Getting windows ... and getting information about windows ... using the Windows API
This post covers a number of Windows API Functions relating to getting windows and getting information about windows.
Sep 34 min read
Â
Â


Getting locale information using the GetLocaleInfoEx Windows API Function
This post demonstrates how to use the GetLocaleInfoEx Windows API Function to get locale-related information.
Sep 23 min read
Â
Â


Flashing the taskbar icon and window using the Windows API
This post demonstrates how to use the FlashWindow or FlashWindowEx Windows API Functions to flash the taskbar icon and window for an application.
Aug 283 min read
Â
Â


Get and set the active printer ... and list all available printers
This post demonstrates how to use the GetDefaultPrinter, SetDefaultPrinter and EnumPrinters Windows API Functions to, respectively, get the name of the active printer, set the active printer and list all available printers.
Aug 224 min read
Â
Â


Testing the state of a key using the GetKeyState Windows API Function
This post demonstrates how to use the GetKeyState Windows API Function to test the state of specific keys ... in this case, the Shift, Ctrl, Alt, Caps Lock and Num Lock keys.
Aug 202 min read
Â
Â


Using 'F1' to view Windows API web pages
VBE_Extras extends the built-in "F1" functionality to open the Microsoft documentation web page for Windows API Functions (i.e. that you have declared using the 'Declare' keyword), Types, Enums and Consts.
Aug 192 min read
Â
Â


Articles: Blog2
bottom of page