|
-
October 18th, 2002, 11:32 AM
#1
Need an API for DataCombo
Wonder if someone already has some code. I want to control when a user can access a bound combo's drop down list, similar to the TextBox Locked Property only via API. Not interested in using the Enabled property.
Basically...
.
if bEditFlag = False
<code to prevent the dropdown from operating>
else
<code to allow the dropdown to operate>
end if
.
Anyone?
Thanks
Last edited by praymond; October 18th, 2002 at 11:35 AM.
Paul
-
October 18th, 2002, 11:59 AM
#2
You can use SendMessage API to dropdown th e combo
Private Declare Function SendMessageLong Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
Public Sub DropDown(cbo As ComboBox, blnShow As Boolean)
If blnShow Then
SendMessageLong cbo.hwnd, CB_SHOWDROPDOWN, 1, ByVal 0&
Else
SendMessageLong cbo.hwnd, CB_SHOWDROPDOWN, 0, ByVal 0&
End If
End Sub
Check your boolean and then collapse CB
-
October 18th, 2002, 12:19 PM
#3
Thanks, I'll give it a try.
Paul
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
|