Login | Register | Home
Viewing list of all topics
Viewing topic 'Windows API Calls'.
Description: Code snipets that show how to use the Windows API.
Back to topic list
Getting computer up time [Viewed 8014 times | Rated 1/5 | Author: thread]
A demonstration of how to get a hold of how long your computer has been switched on.
Another way to make the computer beep. [Viewed 7178 times | No Rating | Author: eAi]
This shows you how you can make a beep come out of the system speaker, and set the frequency of it too. This uses the Beep API.
Move the windows mousepointer using win32api [Viewed 7016 times | No Rating | Author: Tim Schumacher]
This code will move the mouse pointer on behalf of the user, you can click on a commandbutton and the mouse pointer will jump to another command button on the form
Terminate a Windows Task [Viewed 7414 times | No Rating | Author: Tim Schumacher]
Using the applications window title - terminate any windows application.
Disabling CTRL+ALT+DEL [Viewed 6537 times | No Rating | Author: Damien]
A simple code to disable this System Keys... (Only works with Win9x)
How to hide and show the mouse cursor. [Viewed 7600 times | No Rating | Author: eAi]
This shows you how to use the ShowCursor API.
Detect when a program closes [Viewed 6066 times | Rated 2/5 | Author: Ducks]
Pauses your app untill a prorgam terminates, then carries on.
Lock an XP or 2K workstation [Viewed 7666 times | Rated 2/5 | Author: cryax]
Possibly the simplest piece of code on here but never the less, to lock up a workstation in XP or 2K
Flashing icon on the Taskbar [Viewed 8510 times | Rated 2/5 | Author: Damien]
How to make your app flashy
How to show the 'Select a Folder' box [Viewed 6214 times | Rated 2/5 | Author: eAi]
This shows you the api call that shows the 'Select a Folder' box. You'd think the common dialog thingy would do it, but you'd be wrong.
How to add an icon to the system (time) tray. [Viewed 7056 times | Rated 1/5 | Author: eAi]
This shows you how you can add an icon next to the clock in the system tray
WM_ Constants [Viewed 8116 times | Rated 1/5 | Author: eAi]
You never know when you might need these
Drawing a Pie Diagram [Viewed 6270 times | Rated 1/5 | Author: Damien]
How to draw a pie diagram using the Pie-Api
How to find the Windows OS version [Viewed 7548 times | Rated 1/5 | Author: eAi]
Shows you the API call to retrieve the Windows version
How to use GetAsyncKeyState to check key states [Viewed 7136 times | No Rating | Author: eAi]
Shows how to get the state of certain keys using GetAsyncKeyState
Box Fill [Viewed 6282 times | Rated 2/5 | Author: eAi]
This peice of code re-creates the filling box effect which can be seen when a visual basic project is being loaded
How to get the computer's name. [Viewed 6788 times | Rated 2/5 | Author: eAi]
How to get the local computers name
API Message Box Function [Viewed 6294 times | Rated 1/5 | Author: sPiKie]
API Message Box Function
How to get all the child windows of a window using EnumChildWindows [Viewed 6308 times | Rated 1/5 | Author: eAi]
This code shows you how you can get the captions and handles for all of the child windows of an object
Shutdown the computer [Viewed 7830 times | Rated 1/5 | Author: eAi]
This code will shut down the computer, as well as loggin of and restarting it.
Setting a timer using SetTimer API [Viewed 7382 times | Rated 1/5 | Author: thread]
Demonstration of use of SetTimer and KillTimer API calls.
How to get and set the title of a window [Viewed 6661 times | No Rating | Author: eAi]
This shows you how to use GetWindowText and SetWindowText api commands.
The Sleep Function (delay) [Viewed 7424 times | Rated 1/5 | Author: Damien]
How to make your program await a certain amount of miliseconds
How to check if a key or keys are down [Viewed 7100 times | Rated 1/5 | Author: eAi]
Shows you how you can check the status of multiple keys at once using the GetKeyState api
How to simulate a key press [Viewed 6289 times | Rated 2/5 | Author: eAi]
Shows you how you can use API to simulate a key press.
How to show the run dialog [Viewed 6158 times | Rated 1/5 | Author: eAi]
Shows you how you can show the Run dialog (as in Start -> Run)
Open/Close CDROM [Viewed 6518 times | Rated 1/5 | Author: kvirri]
Eject and inject CDROM
All about API [Viewed 6246 times | No Rating | Author: eAi]
This tells you how you can get started in the wonderful world of Windows API
Get user name [Viewed 7076 times | Rated 1/5 | Author: acidscar]
How to get the current username
Simulate a mouse click [Viewed 6754 times | Rated 1/5 | Author: eAi]
This shows you how you can use the mouse_even api to simulate a mouse click.

All the source code

Site contents and design © Ed Lyons 2004 - 2006