Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MouseOver a ComboBox 2

Status
Not open for further replies.

MaxRaceSoftware

Programmer
Jun 10, 2002
36
US
How can i trigger a "MouseOver" event
over a ComboBox in VB6 ?? (like a ListBox)

(besides placing the CombBox inside a Container )

Thanks
MaxRace Software - Larry Meaux
ET_Analyst for DragRacers
Support Israel - Genesis 12:3
 
There sure is. Use the Combobox that is found in the Fm20.dll (Microsoft Forms). It has an event called MouseMove. That should do it for you.
 
Thanks rorubin (Programmer)

MaxRace Software - Larry Meaux
ET_Analyst for DragRacers
Support Israel - Genesis 12:3
 

Only problem is you cannot redistribute that control. So you will have to rely on your users to have office installed for them to use your program.

Good Luck

 
Note that, cpad notwithstanding, you still can't redistribute the Forms 2.0 library. All you can do is point the user to the Control Pad download.
 
strongm
You're right! Although it hardly makes sense to me.


The Fm20.dll is NOT redistributable. You must have an application such as Microsoft Office 97 on the target system that installs Fm20.dll as part of its setup. You may not distribute the Fm20.dll as part of your setup, even if you purchase the Microsoft Office Developer Edition product.

As an alternative to having your end users install Microsoft Office, you can have them freely download and install the Microsoft ActiveX Control Pad, which also installs the Fm20.dll.

NOTE: The use of these Microsoft Forms components in your own compiled applications, such as those written with Microsoft Visual C++ and Microsoft Visual Basic, is not recommended or supported. These controls were designed and tested to work exclusively within Microsoft Office and its Visual Basic for Applications environment.



 
I suspect that it may have had something to do with the chinese wall between Microsoft's Applications groups and the Systems groups.
 
And if you happen to be stuck with users that have no way of downloading that app and don't have office?

Keeping in mind the warnings about the potential dangers of subclassing, you can use that to capture the MouseMove event over the control and return the mouse position.

Robert
 
Having read the above ....

then , How can i make a ListBox

dropdown like a ComboBox ???


Also make the ListBox's DropDown "Arrow" the same size and Look as the
ComboBox ???


(..it sure would have been easy , if MS , would have included the "MouseOver event" for a ComboBox !!!!!! )
MaxRace Software - Larry Meaux
ET_Analyst for DragRacers
Support Israel - Genesis 12:3
 
You can always resort to "making" your own. You need:

1: A Text Box
2: A Command Button
3: A List Box

Place the text box on the form, put the command button beside it to the right, and make it the right size for the dropdown arrow.

Set the style for the command button to graphical, and no caption. Use the common arrow pictures that come with VB to get the one used for the dropdown arrow.

Place the listbox under the textbox and set it's visible property to false.

So now all you have to do is write the code for the button click ( to make the listbox visible, and to populate the list if it hasn't already been done ), and the code in the click event for the list ( to populate the text box, and make the list invisible again ). Plus other code depending on how you want it to act. And now you get the mousemove event from the listbox.

Hope this helps,

Robert
 
You can always use a hook on a combo, and have a listbox drop down instead.. [/b][/i][/u]*******************************************************
General remarks:
If this post contains any suggestions for the use or distribution of code, components or files of any sort, it is still your responsibility to assure that you have the proper license and distribution rights to do so!
 
i have the VB6.0 source code to add a "Horizontal Scroll Bar" to a ListBox with API calls

but can't find the same to add a "Vertical Scroll Bar"
to a ListBox

anyone have code to create a "Vertical Scroll Bar"
to a ListBox" ???

i'm wondering if coding the ListBox this way thru API would
cause it to display a Full-Size dropdown arrow like a ComboBox ??

any further ideas ??

MaxRace Software - Larry Meaux
ET_Analyst for DragRacers
Support Israel - Genesis 12:3
 
The vertical scroll bar for a list box is automatically added by the list box control, if you have more items listed than can be shown in the visible area of the box.

Robert
 
yes, but the problem with a ListBox is you get (2) small ARROWS

(Up / Down) in the same Text Height box

..trying for the same Look as a ComboBox

--------------------------------------------------

Anyways, i just decided just to place a ComboBox in a Frame Control w/no Border ..to trigger the MouseMove event on the ComboBox instead of trying to make a ListBox function like a ComboBox


Thanks for all the Help !



MaxRace Software - Larry Meaux
ET_Analyst for DragRacers
Support Israel - Genesis 12:3
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top