Desktop Functions: Smart Device Functions:
|
destroywindow (user32)
C# Signature:
[DllImport("user32.dll")] VB Signature:
Declare Function DestroyWindow Lib "user32.dll" (hWnd As IntPtr) As Boolean Notes:hWnd is the pointer to the window you want to close/destroy. Create a new IntPtr object with the window's handle as a parameter to it's constructor. Make sure the pointers are in decimal, not in hex as spy++ gives them to you. Tips & Tricks:Please add some! Sample Code:[DllImport("user32.dll")]
static extern bool DestroyWindow(IntPtr hWnd); //Closes the form btnCloseWindow_Click(object sender, EventArgs e) {
DestroyWindow(this.Handle) } Alternative Managed API:System.Windows.Forms.Form.Close Please edit this page!Do you have...
Select "Edit This Page" on the right hand toolbar and edit it! Or add new pages containing supporting types needed for this API (structures, delegates, and more). |
|