Declarations:
Public Const WM_CLOSE = &H10
Declare Function GetActiveWindow Lib "user32" Alias "GetActiveWindow" ( ) As Long
Declare Function PostMessage Lib "user32" Alias "PostMessageA" (Byval hwnd As Long, Byval wMsg As Long, Byval wParam As Long, lParam As Any) As Long
Code:
Messagebox "Sie sind es nicht wert, mit Notes zu arbeiten !"
wh = GetActiveWindow()
Call PostMessage(wh, WM_CLOSE, 0&, 0&)
HTH,
Bernhard