Findwindow und SendMessage

Hey, ich bin versucht, herauszufinden, warum dieser nicht sendet ein ALT+F in notepad!

Private Declare Function FindWindow1 Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Const WM_KEYUP = &H101
Private Const WM_KEYDOWN = &H100
Private Const WM_SYSKEYDOWN = &H104

Private Sub Command_Click()
Dim parenthwnd As Long
Dim hwnd As Long

  parenthwnd = FindWindow1(vbNullString, "Untitled - Notepad")
  retvalue = SendMessage(parenthwnd, WM_SYSKEYDOWN, VK_MENU, 1&)
  retvalue = SendMessage(parenthwnd, WM_KEYDOWN, VK_F, 1&)
End Sub

Bekomme ich einen Wert für parenthwnd aber nicht für die retvalue Werte (0).

Was bin ich???

David

  • Wer sonst soll einen Stich an diese?
InformationsquelleAutor StealthRT | 2010-10-25
Schreibe einen Kommentar