vb6 - Select a menu item in another application -


i using vb6 try , select menu item in sub menu of third-party application. can id menu item want click not sure how click button in order have related actions run. here code far:

hwnd = findwindow(psclassname, vbnullstring) if hwnd > 0 call setforegroundwindow(hwnd) mwnd = getmenu(hwnd) sub_menu = getsubmenu(mwnd, 0) button_id = getmenuitemid(sub_menu, 0)  call setfocus(button_id) 

i error:

wrong number of arguments or invalid property assignment

i've tried using:

call sendmessage(button_id, bm_click, 0, 0) 

but didn't work either. ideas appreciated!

if have id of menu item, can send/post wm_command message parent includes id. example:

private const wm_command long = &h111  sendmessage hwnd, wm_command, button_id, byval 0& 

Comments

Popular posts from this blog

Fail to load namespace Spring Security http://www.springframework.org/security/tags -

sql - MySQL query optimization using coalesce -

unity3d - Unity local avoidance in user created world -