I know this has probably been asked alot around here, but how would I select something from a different Program, and also is there a way I can select something from a menu on another program in vb ?
I know this has probably been asked alot around here, but how would I select something from a different Program, and also is there a way I can select something from a menu on another program in vb ?
?? :(
geoff_xrx had a post going a couple of days ago....trying to do something similar. Maybe do a search for his Name?:confused:
If you know the classes/captions, you can apply properties like WM_SETFOCUS to it:
Do you need a manual?Code:'Code by: Microbasic
Private Declare Function FindWindowEx Lib "user32" _
Alias "FindWindowExA" (ByVal hWnd1 As Long, ByVal hWnd2 As Long, _
ByVal lpsz1 As String, ByVal lpsz2 As String) As Long
Private Declare Function SendMessage Lib "user32" _
Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal _
wParam As Long, lParam As Any) As Long
Private Const WM_SETFOCUS = &H7
Function Find_hwnd(Text As String, ClassName As String, Optional Starthwnd As Long) As Long
Find_hwnd = Findwindow(Starthwnd, ClassName, Text)
End Function
Sub FocusWin(hWnd As Long)
SendMessage hwnd, WM_SETFOCUS, 0, 0
End Sub