Quick Search for:  in language:    
OCX,little,container,works,like,dropdown,comb
   Code/Articles » |  Newest/Best » |  Community » |  Jobs » |  Other » |  Goto » | 
CategoriesSearch Newest CodeCoding ContestCode of the DayAsk A ProJobsUpload
Visual Basic Stats

 Code: 3,149,602. lines
 Jobs: 144. postings

 How to support the site

 
Sponsored by:

 

You are in:

 
 
PDC 2003: Make the connection
Login



Latest Code Ticker for Visual Basic.
Click here to see a screenshot of this code!HistoryWriter Add-In V.1
By Zvonko Kostovski on 9/3

(Screen Shot)

Click here to see a screenshot of this code!Control Winamp
By Dennis Wollentin on 9/3

(Screen Shot)

Fake Virus Version 1.0
By C.J. Laing on 9/3


][String Encoder
By Andron Smth on 9/3


Font Catalog
By Bill Adams on 9/3


professional search
By Ziad Said on 9/3


Click here to see a screenshot of this code!Drew's Meta Tag Generator
By Drew Phillips on 9/3

(Screen Shot)

Fast BruteForce Class
By §e7eN on 9/3


Click here to see a screenshot of this code!Lotus Domino Exploit Scanner
By §e7eN on 9/3

(Screen Shot)

Click here to put this ticker on your site!


Add this ticker to your desktop!


Daily Code Email
To join the 'Code of the Day' Mailing List click here!





Affiliate Sites



 
 
   

DropDownControlContainer

Print
Email
 
winzip icon
Submitted on: 2/2/2003 7:35:28 AM
By: Ulli 
Level: Advanced
User Rating: By 38 Users
Compatibility:VB 6.0

Users have accessed this code 5997 times.
 

(About the author)
 
     This little container OCX works like dropdown combo exept that it can contain other controls. Dropdown and Collapse can be set to occur either on MouseEnter/Exit or on TitleClick. For those of you interested in how to use Mouse Tracking this is a good example because it uses Subclassing and the Windows MouseLeave and MouseHover system messages to control it's behavior. Try it, download is only 8.5 kB. Tested (and probably works on) Win32 only!

 
winzip iconDownload code

Note: Due to the size or complexity of this submission, the author has submitted it as a .zip file to shorten your download time. Afterdownloading it, you will need a program like Winzipto decompress it.

Virus note:All files are scanned once-a-day by Planet Source Code for viruses,but new viruses come out every day, so no prevention program can catch 100% of them.

FOR YOUR OWN SAFETY, PLEASE:
1)Re-scan downloaded files using your personal virus checker before using it.
2)NEVER, EVER run compiled files (.exe's, .ocx's, .dll's etc.)--only run source code.
3)Scan the source code with Minnow's Project Scanner

If you don't have a virus scanner, you can get one at many places on the net including:McAfee.com

 
Terms of Agreement:   
By using this code, you agree to the following terms...   
1) You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.   
2) You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.   
3) You may link to this code from another website, but ONLY if it is not wrapped in a frame. 
4) You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.


Other 45 submission(s) by this author

 

 
Report Bad Submission
Use this form to notify us if this entry should be deleted (i.e contains no code, is a virus, etc.).
Reason:
 
Your Vote!

What do you think of this code(in the Advanced category)?
(The code with your highest vote will win this month's coding contest!)
Excellent  Good  Average  Below Average  Poor See Voting Log
 
Other User Comments
2/2/2003 9:53:47 AM:_Merlin_
Now this is what I call some code! 
Nice going Ulli, 5 mouseballs comming 
your way! ;)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/2/2003 1:26:21 PM:Sub-Zero
Another 5 for another wonderful piece 
of code.
Your the best :)
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/3/2003 2:35:42 AM:kps
Brilliant!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/3/2003 5:31:50 AM:Will Barden
One slight problem: if you change the 
backcolor of the control (red), it 
doesn't show when expanding - the 
default window backcolor (grey) shows 
instead whilst it's expanding. To 
change this, add a UserControl.Refresh 
in the expand loop.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/3/2003 8:45:51 AM:Coite Moss
It's a keeper, very nice ! Vote of 
Excellent is all yours. Thanks for 
sharing this.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/3/2003 11:52:20 AM:Ulli
Will, there's a Dovents in both loops. 
That should take care of repainting. I 
cant see it on my PC because it expands 
and collapses too fast
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/3/2003 12:21:52 PM:Hibiki Tokai
pretty cool!!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/3/2003 12:59:20 PM:Mirko Kressmann
This is the same as my 
MaxStrip-container, but my container 
has no support for mouse-in ore 
mouse-out events. On the other side the 
Maxstrip has support for Childs 
(Maxstrip´s Childs moves down or up if 
the container opened ore closed) and 
support for Clones (Clones open ore 
close if the container opened ore 
close). However... nice code ... 
Mirko 
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/3/2003 5:26:27 PM:Ulli
Okay, instead of DoEvents put a 
UserControl.Refresh in the Expand loop 
and a Parent.Refresh in the Collapse 
loop
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/6/2003 9:46:11 AM:ORSHEE
Let me give you a piece of advice.
You 
should use Create
WindowEx API instead 
of using usercontrol, and create window 
so it on top of all the others having 
in mind vertical position ov your new 
window so when you open the content 
window is created below or above the 
visible part.
Loading other controls 
in your new window is a bit tricky part 
you could find challenging for you and 
there are very good examples here on 
PSC on that topic.
Without offense 
i'll rate this code with 1 globe 
because it is in advanced category 
where it doesn't belong for sure and 
can't agree this is a good learning 
example.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/6/2003 11:03:41 AM:Ahmadu Mohammed
Nice work, Five Globes from me
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/6/2003 12:21:41 PM:Ulli
Seems you have not understood what OCXs 
are for, Orshee. Let me give YOU some 
advice: they can be compiled separately 
and put in the toolbox, together with 
the other controls. And then you can 
simply paste them into the form you're 
developing, without any further ado 
about calling any API functions, just 
as you would paste in a frame or a 
textbox.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/12/2003 7:48:06 PM:ORSHEE
If you look at the previous month 
contest winner list you'll see a 
familiar name with SuperGrid OCX.
So 
don't tell me what OCX controls 
are.
When time comes you'll understand 
what i was talking about.
Obvius 
example of bad funcionality of your 
code can be seen when comparing it with 
combo in critical situations, when for 
ex: you have a control close to the 
bottom border of a form, try to put a 
combo and your control, and you'll se 
what i'm talking about.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/22/2003 8:03:05 PM:Troy Rabel
Nice work Ulli, 5,555 Globes !!!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
2/27/2003 7:50:31 AM:OcX-Girl
Nice idea, but your controls Z-Order 
should be as orshee said, combo like, 
on top of all windows.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/12/2003 7:44:20 AM:{ pHroZeN GeeK }
nice code.  would be great if u can add 
fading effect as a customizable option, 
 where the control fades in as it drops 
down... and maybe "Easy in" where the 
control drops quickly initially and 
slowly stops in the end
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
4/12/2003 11:10:17 PM:Kris Bennett - (i00 Productions)
This is the worst piece of code that i 
have ever seen that has made it to the 
top in the coding contest ... I gave 
you 1 globe .. and thats only because u 
can not give 0! VB Accelerator have a 
much better user control for this!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/1/2003 10:54:52 AM:Dream
mouseover events are unreliable, also 
its 'sticky', I agree Kriss shouldnt be 
up top
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/11/2003 11:16:57 AM:Phred
I had to use a click event to open and 
close after changing background color. 
Mouseover just wouldnt work anymore. 
Even though there are more ways to 
skin a cat, I have not seen any 
submissions using those. I think this 
is a great way to increase information 
on a form and I am using it.
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
5/14/2003 11:02:49 AM:Henrik Alsing Pedersen
took me some time to get it work (about 
10 min), but when i worked i saw it's 
power!
5 globes...
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
8/15/2003 1:21:48 AM:Carl Bartlett
5 globes for the fact of the mysubclass 
which allows me to track mouseevents.  
A note about the ptinrect, in and 
code for determining if the point is in 
the rect... for some reason it didn't 
work.  The ptinrect api says that it 
returns true if the point is ontop of 
or to theleft of the rect... that is 
not is... and I kept getting out of 
rect when i moved the mouse quickly 
over my control... I wrote my own 
inrect function and it works perfect 
now!
thx for the trackmouse event 
code!
Keep the Planet clean! If this comment was disrespectful, please report it:
Reason:

 
Add Your Feedback!
Note:Not only will your feedback be posted, but an email will be sent to the code's author in your name.

NOTICE: The author of this code has been kind enough to share it with you.  If you have a criticism, please state it politely or it will be deleted.

For feedback not related to this particular code, please click here.
 
Name:
Comment:

 

Categories | Articles and Tutorials | Advanced Search | Recommended Reading | Upload | Newest Code | Code of the Month | Code of the Day | All Time Hall of Fame | Coding Contest | Search for a job | Post a Job | Ask a Pro Discussion Forum | Live Chat | Feedback | Customize | Visual Basic Home | Site Home | Other Sites | About the Site | Feedback | Link to the Site | Awards | Advertising | Privacy

Copyright© 1997 by Exhedra Solutions, Inc. All Rights Reserved.  By using this site you agree to its Terms and Conditions.  Planet Source Code (tm) and the phrase "Dream It. Code It" (tm) are trademarks of Exhedra Solutions, Inc.