ccrpminilogo.gif (1886 bytes)  UpDown/VB6
 Download       Control List  
  
Designer: Jeremy Adams
Tuesday, January 06, 2004
VB6 COMPILE
Version:
version 1.03.009

Filename:
ccrpudn6.zip

Download:
71k (w/ demo, help)

REQUIREMENTS
Development:
VB6 SP0/1/2/3

Runtime:
VB6 SP0/1/2/3 runtime


CONTACT
jeremyadams@hotmail.com
   

OTHER CONTROLS
CCRP Animation, VB6
CCRP Animation, VB5
CCRP HotKey, VB6
CCRP HotKey, VB5
CCRP IP Address, VB6
CCRP IP Address, VB5
CCRP Pager, VB6
CCRP Pager, VB5
CCRP Progress Bar, VB6
CCRP Progress Bar, VB5
CCRP UpDown, VB5
CCRP UpDown, VB5
   

REVISION HISTORY
VB6 Version 1.03.009
April 6, 2000

VB6 Version 1.02.008
Oct 29, 1999

VB6 Version 1.00
Sept 26, 1999

VB6 Beta - Initial Release
Sept 12, 1999

The CCRP UpDown Control from Jeremy Adams provides a direct replacement for the MS-provided version supporting additional features available on systems with comctl32.dll for IE3 or greater.

ctlupdna.gif (13890 bytes)

ctlupdnb.gif (12969 bytes)


New in this Release

  • Fixed a bug in the refresh method

Fixed in release 1.02.008

  • Problems relating to the Change event not firing when the control was not buddied were fixed.
  • Errors are no longer raised from the UserControl_ReadProperties event.

Fixed in release 1.01.006

  • The Change event was renamed to Changing and is to be used to modify the Pos/Delta
    parameters before they take effect. The Change event now passes the Pos once the
    change has taken effect.

Fixed in release 1.00.005

  • Several bugs in the acceleration class were fixed.
  • The HotTrack property is now visible. Hot Tracking is only supported on NT5\Win2000 or  Win98 and above.

Features of the CCRP UpDown Control

  • Support for acceleration profiles when the user holds down the mouse button on the up or down buttons. For example, pressing a UpDown button changes the buddy value by one -- with continued pressing the value changes to the incremental values specified in the acceleration profile, (ie two seconds increments by 5, five seconds increments by 20). These intervals can be redefined by the developer.
  • Support for buddying to any control that responds to the WM_SETTEXT message (See Buddying Readme.txt / below for more information).
  • AllowArrowKeys property for allowing or disallowing the value to be changed when the user uses the arrow keys in the buddy control.
  • Support for using the MouseWheel within the buddy control to increment/decrement the value.
  • Base property to set whether the control uses decimal or hexadecimal.
  • BuddyAlignment property to set whether the up down control is displayed to the left or right of the buddy control.
  • Min, Max and Pos properties to set the range and position for the control.
  • Orientation property to set whether the arrows are drawn up and down or left and right.
  • SyncBuddy property to allow/disallow updating the contents of the buddy control.
  • ThousandsSeparator property to set whether or not values displayed in the buddy control include thousands separators.
  • Unicode property to set whether or not he control uses Unicode.
  • Wrap property to set whether or not the control wraps around when the minimum or maximum value is reached.

Using Buddying with the CCRP UpDown Control

Buddying is one of the most important aspects of the control. You can either respond directly to the UpClick and DownClick events to respond to the user clicking on the buttons or you can take advantage of the automatic buddying available in the control.

The control acts as a control container - within the VB IDE you can drag a control onto the Up Down control. The control will then buddy with the first contained control (it will ignore any other controls that you place in the container after the first one) - the buddy control will be automatically resized to fit the size of the container minus the size of the Up Down control.

The advantage of using this form of automatic buddying is that the AllowArrowKeys property can be used to set whether or not the up and down arrow keys sent to the buddy control are captured and interpreted by the Up Down control and the same with mousewheel messages. This form of buddying will work with any control that has a hWnd and responds to the WM_SETTEXT message to set the displayed text within the control. Most commonly, the Up Down control will be buddied with a textbox.

Once the buddy control has been dropped onto the Up Down control, the buddy control will be resized to fit the Up Down control. After that point, you can resize the buddy control by simply selecting it in the normal way within the IDE and then resizing it. The Up Down control will detect the resizing and then adjust the size of the Up Down control to fit the remaining space.


VB Common Controls Replacement Project UpDown Control
Copyright 1999-2000 Jeremy Adams, CCRP
http://ccrp.mvps.org/