Important alert: (current site time 5/25/2013 8:18:55 PM EDT)
 

winzip icon

Slider_Mixer_Control_Upgrade_3.5

Email
Submitted on: 8/7/2012 3:27:19 PM
By: Charles Kistler 
Level: Intermediate
User Rating: By 6 Users
Compatibility: VB 6.0
Views: 4773
 
     The original author of this code is Mike Payne. Kenneth Foster expanded his work, adding the horizontal style and several more properties. Version 3.5: When drawing a new control, the code looks at the aspect ratio of the new control and sets the Style property accordingly. Toggling the Style property of the control swaps the width/height dimensions, thus preventing the control from shrinking to a small square as in previous versions. Version 3.4: The Enable property has been added. I can't believe I overlooked that one. There is another zip file in the main zip file called FaderBW.zip. It is the same control as the main control except it does not have colored buttons. See the readme.txt in the zip file for more information. Version 3.3: A non-fatal calculation error that only occurred when changing the style and button size while in the IDE has been fixed. The slider now has colored buttons. Version 3.2: Thanks to ThePiper for pointing out a crash when using large values for Min/Max/Value. This has been fixed. Version 3.1: I cleaned up the ReDraw, DrawPicAtValue, and OneIncrement code. The original tick marks would draw every n pixels. I changed them to be evenly spaced apart. By setting the TickMarkCnt = Max - Min - 1, the slider will snap to the tick marks. Version 3.0: I added the Border on/off property, the Min property, corrected a minor bug in the border drawing procedure and added a little error checking when reading property values.

 
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 Winzip to 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 2 submission(s) by this author

 


Report Bad Submission
Use this form to tell us if this entry should be deleted (i.e contains no code, is a virus, etc.).
This submission should be removed because:

Your Vote

What do you think of this code (in the Intermediate 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
6/27/2012 8:59:58 AMGioRock

Too much old style to display on Win7 or above...
(If this comment was disrespectful, please report it.)

 
6/27/2012 1:06:40 PMBonnie West

Looks cool!
(If this comment was disrespectful, please report it.)

 
7/1/2012 2:06:54 PMThePiper

Nice work; I like it.
If you are interested in MouseWheel support please send me an e-mail;
I can send you the code for that.
(If this comment was disrespectful, please report it.)

 
7/9/2012 4:27:33 PMThePiper

Hello Charles
If I touch the Faders right border with the (small) Button then Sub Scroll, m_Value = realX + m_Min fires an Overflow error (6). m_Value is an Integer and realX contains 32949, m_min 0. The Overflow is obvious, but the context is not clear to me. The calculation of m_value should be more defensive. Please check. Thanks for the good work.
(If this comment was disrespectful, please report it.)

 
7/10/2012 10:41:33 AMCharles Kistler

To ThePiper:
I tried to email you but don't know if you received it. Version 3 drew the small fader button outside of the control's boundary. Version 3.1 fixed that. Please let me know if v3.1 is causing this. I can't reproduce the error. Does it happen on a horizontal/vertical/both style fader? Thanks!
(If this comment was disrespectful, please report it.)

 
7/16/2012 3:32:18 PMThePiper

@ Charles: Thanks for the final release. Works fine. In operation on several machines - day and night.
;-)
(If this comment was disrespectful, please report it.)

 
7/31/2012 8:30:03 AMGioRock

OVERFLOW!!!

Hi, I just download this new Colored Project better than previous, so, after 2 sec. an error overflow popup is shown...
To repeat this conditon, try this:

1) Drag slowly yellow fader to the left
2) Move cursor out to the object some pixels
3) Release the mouse button

(If this comment was disrespectful, please report it.)

 
7/31/2012 1:25:37 PMCharles Kistler

GioRock:

I'm sorry, but I can't repeat the crash on my Win 7 64 bit laptop. I'll try it on XP 32 bit. If it is crashing in the IDE, which procedure crashes - Scrolling? Anything you can provide will help! Thanks.
(If this comment was disrespectful, please report it.)

 
7/31/2012 4:36:21 PMCharles Kistler

Thanks to GioRock, who reminded me that I accidently left a test line in the Form_Click event. Delete the line 'Fader4.Max = 1E+24' in that event and the overflow will not happen.
(If this comment was disrespectful, please report it.)

 

Add Your Feedback
Your feedback will be posted below and an email sent to the author. Please remember that the author was kind enough to share this with you, so any criticisms must be stated politely, or they will be deleted. (For feedback not related to this particular code, please click here instead.)
 

To post feedback, first please login.