title image


Smiley Re: Andere Programme durch VB beenden?
Hallo,Private Declare Function FindWindow Lib "USER32" Alias "FindWindowA" _(ByVal lpClassName As String, ByVal lpWindowName As String) As LongPrivate Declare Function SendMessage Lib "USER32" Alias "SendMessageA" (ByVal hwnd As Long, _ByVal wMsg As Long, ByVal wParam As Long, lParam As Long) As LongPrivate Sub Command1_Click()Dim Handle As LongConst NILL = 0&Const WM_SYSCOMMAND = &H112Const SC_SIZE As Long = &HF000&Const SC_SEPARATOR As Long = &HF00F&Const SC_MOVE As Long = &HF010&Const SC_MINIMIZE As Long = &HF020&Const SC_MAXIMIZE As Long = &HF030&Const SC_CLOSE As Long = &HF060&Const SC_RESTORE As Long = &HF120&' Handle auf Fenster der aktuellen Anwendung' findet Fenster, wenn Caption bekannt.' es gibt verschiedene andere Möglichkeiten diese Fensterangaben herauszubekommen, die mir momentan nicht vorliegen, aber im Internet zu finden sindHandle = FindWindow(vbNullString, Me.Caption)erg = SendMessage(Handle, WM_SYSCOMMAND, SC_CLOSE, NILL)End SubGrüßeBard

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: