In Photoshop we often work with multiple windows open. They can be cascaded to more easily be able to view the different windows and tell them apart. There's an API function that does the same to any windows you specify, you can even define the rectangle where they should be cascaded within.
Read the complete 1751 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Let's be a bit more graphic. This time I'll show you how to use the Windows API to make your forms fade in/out, slide in from the side or do various other animations. For this example we'll have to use a Windows Forms project as we have to utilize a Form object in the example.
Read the complete 2369 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Last time I made an example of how to enumerate windows. This time I present to you a class that greatly simplifies the process of searching for specific windows, types of windows, windows belonging to a specific process, having a specific text. You can search for any number of these parameters at the same time, using regular expressions for all string matches to provide optimal flexibility.
Read the complete 7688 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Until now we've seen how to retrieve basic properties of windows as well as how to interact with them by sending keypresses. Up until now we've had to find the handle by using Winspector or a similar program. This time I'll present a way of finding the handles programmatically.
Read the complete 3973 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
Now to complete the toolset required to make a great spyware / browser hijacking application, we'll make Internet Explorer navigate to the address we set.
Read the complete 2149 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
This time we want to retrieve the text from a given window, represented by a handle. Like last time, open an Internet Explorer instance. Now open Winspector and select the address field, ensure that it is the address field itself (class = Edit) and not the ComboBox that you select.
Read the complete 2705 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
So we have a handle, what process does it belong to? Our goal is to obtain a .NET System.Diagnostics.Process object that corresponds to the owner process of the handle we input.
Read the complete 1842 bytes...
Digg it |
Kick it |
Dzone it |
Reddit
First of all, to manipulate and use the Win32 API, we must know about the system itself, the windows, the controls and so forth. Visual Studio comes bundled with Spy++ which enables us to identity the various windows and controls of application, but honestly, it's pretty bad. Instead you should
download Winspector.
Read the complete 1600 bytes...
Digg it |
Kick it |
Dzone it |
Reddit