![]() Length = GetWindowText(app_hWnd, buf, length) Public Function EnumCallback(ByVal app_hWnd As Long, ByVal param As Long) As Long ' Check a returned task to see if it's the one we want. Private Declare Function EnumWindows Lib "user32" (ByVal lpEnumFunc As Long, ByVal lParam As Long) As Long Private Declare Function GetWindowText Lib "user32" Alias "GetWindowTextA" (ByVal hwnd As Long, ByVal lpString As String, ByVal cch As Long) As Long Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Long) As Long 'X = SendMessage(target_hwnd, WM_HSCROLL, SB_LINELEFT, ByVal 0&) this is an example of scrolling the handled window, also not working 'X = SendMessage(target_hwnd, WM_CHAR, 86, 1) this is an example of sending the letter 'V' to the handle SWP_NOOWNERZORDER Or SWP_NOSIZE Or SWP_NOZORDER SetWindowPos target_hwnd, 0, 0, 0, 0, 0, _ Target_hwnd = FindWindowByPartialTitle(txtTitle.Text) ![]() ![]() Private Declare Function SetWindowPos Lib "user32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Integer, ByVal lParam As Long) As Long I had already investigated into this before i replied, ill paste the code here, i found a code which uses a partial string and finds the process if it is there, moves and resizes it, and tried to combine this with the sendmessage API but i cant get it to work. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |