VB 6.0 - Window Related Functions

Create Multi-Line ToolTips
Create ToolTtip windows with text that spans multiple lines and contains text formatting characters such as vbCrLf and vbTab.

Enumerate all Windows in the System
List all top-level windows currently in existence, extract each window's handle, class name, title, process and thread IDs. See how to relate window and process information, use callback functions and Set Tab Stops in a ListBoxes.

Restore or Minimize One or All Windows
Query a window's current state (minimized, restored or maximized) and return it to its normal state. You can also minimize or restore ALL open windows.

Bring a Window to the Foreground
Making a form the foreground window requires determining the foreground thread and attaching it to your window, using AttachThreadInput, then calling SetForegroundWindow.

Spy on the Window Under the Cursor
Move the cursor over any window and get its caption, text, style, extended style, size, thread ID, process ID and its parent window's handle and text.

NOTE: you can also display the actual text of encoded password fields. However, by subclassing you can properly protect your passwords.

Capture and Print a Form, the Screen or Any Portion of Any Window
Capture any part of any window, including the desktop window, and created a bitmap out of it. Then send this image to your printer.

About TheScarms
About TheScarms

Sample code
version info

If you use this code, please mention "www.TheScarms.com"

Email this page

© Copyright 2024 TheScarms
Goto top of page