Archive for January 2007
WinAPI : Getting Window Texts
Window Text of a window is the caption on the title bar if the window is a form, or the text contained it the window in question here is a control on some form. Getting a window text or setting it requires calling the SendMessage function (described in More on SendMessage) with messages WM_GETTEXT and WM_SETTEXT resp.
Read the rest of this entry »
WinAPI : Prevent Setting foreground window
The earliest Windows Operating Systems allowed any process to set the foreground window. However with Windows98/Me restriction were placed for which process should be allowed to set a foreground window. That may be the process itself in the foreground or a process started by it or the process that last received the input event. Any other process can set foreground window only if there is no other process in foreground or explicitly allowed using the AllowSetForegroundWindow function or no lock has been placed using LockSetForegroundWindow function. Windows98/Me allows setting a foreground lock timeout which if set to zero makes the operating system behave as with the earlier versions.
Read the rest of this entry »
WinAPI : Working with Windows Handles
We last saw how to get handles to the windows. Now once you got the handle you can call various functions to do a variety of jobs as getting information regarding the window, or changing the window’s state or style. Let’s see some of these functions.
Read the rest of this entry »
Getting Window Handles
Previously we saw how to get handle to a window using a few commands. Windows have more API functions that facilates getting handle to windows in more complex or different situations. Listed here are a few of them.
Read the rest of this entry »
Windows and Handles
In my last post we saw how to get the rectangle area occupied by a window given its handle. Now what is a handle and what exactly is a Window?
Read the rest of this entry »
RECT applied to Windows
In my post Windows API functions for Rectangle we saw API functions related to RECT structure. As already discussed the RECT structure is important to Windows as all the Windows are rectangle and the Controls. Lets see here some functions that show relevance of RECT to windows.
Read the rest of this entry »
System Shutdown Windows API Functions
Windows API provides access to many functions that are not available as in-built functions with Visual Basic. System shutdown functions are just few of them. Let’s get them one by one.
Read the rest of this entry »


