Jalaj

January 31, 2007

WinAPI : Getting Window Texts

Filed under: Visual Basic, WinAPI — Jalaj @ 4:24 am

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.
(more…)

January 30, 2007

WinAPI : Prevent Setting foreground window

Filed under: Visual Basic, WinAPI — Jalaj @ 5:20 am

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.
(more…)

January 29, 2007

WinAPI : Working with Windows Handles

Filed under: Visual Basic, WinAPI — Jalaj @ 5:40 am

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.
(more…)

January 28, 2007

Getting Window Handles

Filed under: Visual Basic, WinAPI — Jalaj @ 10:56 am

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.
(more…)

January 27, 2007

Windows and Handles

Filed under: Visual Basic, WinAPI — Jalaj @ 4:02 am

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?
(more…)

January 26, 2007

RECT applied to Windows

Filed under: Visual Basic, WinAPI — Jalaj @ 4:50 am

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.
(more…)

January 25, 2007

System Shutdown Windows API Functions

Filed under: Visual Basic, WinAPI — Jalaj @ 4:03 am

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.
(more…)

Next Page »

Blog at WordPress.com.