views:

22

answers:

1

hi,

i'm coding a little app for controlling soulseek - what i want do is clicking the "Search Files" button by code.

i've got the handle to the tabbed control (SysTabControl32) and managed to change the tab with following code:

rc1 = SendMessage(hwnd, TCM_SETCURFOCUS, ByVal 0, ByVal 0&)  

the problem:

the tab control is changing to the proper button, but nothing happens. i assume i also also have to send a mouseclick to it, as when clicking by mouse, the button goes down and up again.

any ideas how to do this?

thx

+1  A: 

Use TCM_SETCURSEL instead.

Private Const TCM_FIRST               As Long = &H1300
Private Const TCM_SETCURSEL           As Long = (TCM_FIRST + 12)
wqw