Attached to this post is a zip file containing the project files (vbp, frm, etc...) for this VB6 program. It is designed to demo a few API calls involving window handles.
This program lists all the available window handles, and then lets you "deface" the title bar of a given window by doubleclicking on it in the listbox, or by selecting it in the listbox and then clicking the "Hack Selected Window Title" button. If you click the "Hack All Window Titles" button, it goes through every item in the list and defaces the corresponding title bar. It even has a simple search funciton for finding a particular window in the list. The string it puts on the title bar of a window is "You've been hacked by: Ub3r 1337 h4x!". This string is stored in the constant DefaceText, so you can change it at design time if you want. The only way to repair a window's title bar is if you do something in the program that causes the program to set the title bar text, or else you have to close and restart the program.
Note that when you use the "Hack All Window Titles" button, even windows without title bars (normally invisible windows, which show up in the listbox as WindowsHandle=xxxxxxxx, where xxxxxxxxxx is the hWnd of that window) still can have this text applied to them. In fact if you refresh the list, you'll see that some of them have actually successfully been assigned this text, although it's invisible because the window is invisible. While this has (as far as I've seen) cause no problems, it is possible that in certain conditions it may cause errors or even a computer crash (if the error was triggered in an invisible window run by the OS itself).
Note also that while the text that is applied to the window title bars includes the word "hack", I am not condoning using this (or any other software) to commit cyber crimes. This software is just a demonstration of some of the things you can do when you have access to the handles of various windows. Please don't use it for malicious purposes.
This program lists all the available window handles, and then lets you "deface" the title bar of a given window by doubleclicking on it in the listbox, or by selecting it in the listbox and then clicking the "Hack Selected Window Title" button. If you click the "Hack All Window Titles" button, it goes through every item in the list and defaces the corresponding title bar. It even has a simple search funciton for finding a particular window in the list. The string it puts on the title bar of a window is "You've been hacked by: Ub3r 1337 h4x!". This string is stored in the constant DefaceText, so you can change it at design time if you want. The only way to repair a window's title bar is if you do something in the program that causes the program to set the title bar text, or else you have to close and restart the program.
Note that when you use the "Hack All Window Titles" button, even windows without title bars (normally invisible windows, which show up in the listbox as WindowsHandle=xxxxxxxx, where xxxxxxxxxx is the hWnd of that window) still can have this text applied to them. In fact if you refresh the list, you'll see that some of them have actually successfully been assigned this text, although it's invisible because the window is invisible. While this has (as far as I've seen) cause no problems, it is possible that in certain conditions it may cause errors or even a computer crash (if the error was triggered in an invisible window run by the OS itself).
Note also that while the text that is applied to the window title bars includes the word "hack", I am not condoning using this (or any other software) to commit cyber crimes. This software is just a demonstration of some of the things you can do when you have access to the handles of various windows. Please don't use it for malicious purposes.