VBcoders Browse New Submit Contact Sign In

No account? Register free

Forgot password?

WinKill

Matthew Grove  (2 Submissions)   Windows API Call/Explanation   Visual Basic 3.0   Unknown Difficulty   Wed 3rd February 2021

WinKill destroys a window if you know its title bar caption.

Assumes
' Create a form a text box called txtName and a command button called cmdKill

API Declarations
' Api constants for General DeclarationsConst WM_DESTROY = &H2
Const WM_CLOSE = &H10' Api Functions for general declarations
Private Declare Function FindWindowA Lib "user32" (ByVal lpClassName As Any, ByVal lpWindowName As Any) As Integer
Private Declare Function SendMessageA Lib "user32" (ByVal hWnd As Integer, ByVal wMsg As Integer, ByVal wParam As Integer, lParam As Any) As Long

Rate WinKill (16(16 Vote))
WinKill.bas

WinKill Comments

No comments yet — be the first to post one!

Post a Comment

0/1000 characters