|
-
Dec 1st, 1999, 10:43 AM
#1
Thread Starter
Junior Member
Hello again,
A new problam occured at 0'3:30.
I need to switch the combobox that is in another application.
Let's say the combo box has dog,cat,fish, in it.
The combobox is set to CAT.
How do I use API and switch the combobox to DOG?
-
Dec 1st, 1999, 07:14 PM
#2
If you have the window handle (hWnd) of that combobox, then you can use SendMessage API to do that.
Code:
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 CB_SELECTSTRING = &H14D
'-------Use this on any event
Call SendMessage(ComboboxHwnd, CB_SELECTSTRING, -1, ByVal "Dog")
------------------
Serge
Software Developer
[email protected]
[email protected]
ICQ#: 51055819
-
Dec 5th, 1999, 01:47 AM
#3
Thread Starter
Junior Member
Thank you very much Serge!
I have the Window Handle, and is working!
: )
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|