|
-
February 3rd, 2000, 09:26 AM
#1
Can't build control...
I'm trying to build an ActiveX control which will be a more 'useful' combobox.
I've got a text-box, command button and msflexgrid all working nicely in perfect harmony...
The problem is that because the grid and usercontrol windows are children (e.g: WS_CHILD) the grid never displays outside the form on which it's put. (put an ordinary combo box near the bottom of a form, drop down the list portion and you'll see what I mean...)
I can't seem to remove the WS_CHILD style on the grid by any means once the window is created. I've tried using SetParent to set the grid window as a child of the main desktop - this positions the window fine - but now half the events are not firing!!! ARGGGHH!!!! What I expect I need is to keep the grid window 'owned' by the form - but not allow it to be a 'child' of the form.
Any bright ideas?
(If any smart arses say 'just write the thing in C++!' - I probably will one day - but that doesn't help me at work where VB is our only development language..)
-
February 3rd, 2000, 10:01 AM
#2
Re: Can't build control...
I'd recommend you take a look over at http://vbaccelerator.com. There's some excellent code there, including a class that you can use to make any control a proper popup window (see http://vbaccelerator.com/codelib/ddtoolwn/ddtoolwn.htm for the code in question)
Chris Eastwood
CodeGuru - the website for developers
http://codeguru.developer.com/vb
-
February 8th, 2000, 12:13 PM
#3
Re: Can't build control...
Thanks for the tip.
I had a glance at that site - there's come nice material there but I decided to keep going and solve the problem myself. It now works nicely.
Thanks again - Richard.
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
|