|
-
Dec 7th, 1999, 07:32 AM
#1
Thread Starter
Junior Member
Ok, I posted a message about this before.
Now my program is getting complicated..
There is a diffrent program, Im trying to select guest that is in the combobox.
----Code----
Dim signon as long
Parent = findwindow(0, 0, "Parent Frame", vbnullstring)
mdichild = findwindowex(Parent, 0, "MDI Client", vbnullstring)
signon = FindWindowEx(mdichild, 0, "Child", "Sign On")
signCombo = FindWindowEx(signon, 0, "Combobox", vbNullString)
----code----
I found all the HWND above,
In the other program, these are the stuff that are in the combobox>
-Helper
-Online Helper
-Options
-Sign On 32
-Guest
<the sign on 32 changes in the combobox list every time the program opens(sign on 56, sign on 53.. ect)
How do I select Guest from the combobox list using API?
-
Dec 8th, 1999, 02:25 AM
#2
Try Sending the CB_SELECTSTRING Message to the Combobox, eg.
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
Private Sub Command1_Click()
'lHwnd is the Handle of the Combobox you Found Previously..
Call SendMessage(lHwnd, CB_SELECTSTRING, -1, ByVal "Guest")
End Sub
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
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
|