A trackbar is a control that contains a slider (sometimes called a thumb) in a channel, and optional tick marks. When the user moves the slider, using either the mouse or the direction keys, the trackbar sends notification messages to indicate the change. 

Slider control has a minimum, a maximum, and an increment value. You can use the Value of a Slider to modify another adjustable value. For example, a Slider control can enable users to gradually modify volume. When users move the Thumb in one direction, the volume increases; when users move it the other direction, the volume decreases.


FOXYSLIDER is a very lightweight control. Just toss one instance of the class in your form and set some properties!



The following illustration shows some examples of the slider control.


Default controls look

Customize your slider!


Slider control lets users select a value from a range of values. The following illustration shows an example of a Slider control.

Example of a Slider Control

You can customize a Slider control by setting its properties. The following list describes some of the attributes of a Slider that you can customize:

  • The orientation of the Slider, either horizontal or vertical.

  • The tick mark locations along the Slider track.

  • The display of tooltips to show the current value of the Slider.

  • The ability of the Thumb to either snap to tick marks or to be positioned at any point along the Slider.

  • The direction of increasing value along the Slider.

For more information about how to customize a Slider control, see the individual property descriptions below:



Properties / Methods 


Integer (0-5), Determines the style of the Slider to be used:

  • 0 = User Images;
  • 1 = No Arrow;
  • 2 = Both Arrows;
  • 3 = Top or Left Arrow;
  • 4 = Down or Right Arrow
Max Numeric, Returns/sets the maximum value of a control
Min Numeric, Returns/sets the minimum value of a control
Value Numeric, Returns or sets the value
TrackImage Character, The full path and name of the image which represents the track
ThumbImage String. The full path and name of the image which represents the thumb
ThumbImageFocused Character, the full path of the Thumb Image used when the object has the mouse over it
ThumbImageDisabled Character, the full path of the Thumb Image used when the object is disabled
Enabled Logical, Specifies if the control can respond to user generated events.
ControlSource Character, Specifies the source of data to which the control is bound
ShowTips Logical, Determines if ToolTips are shown for the slider on the specified Form. *** The form property 'ShowTips' must be set to .T. as well!!!
The tooltips will be shown only when the Mouse is Clicked on the Thumb button, like the MSCTL32 control.
ShowTipsAlways Logical, will make the tooltips to be shown also when the mouse is not clicked
ShowFocus Logical, Indicates if the control will display a focus rectangle when the control has the focus
IncrementStyle Integer. Returns or sets a value indicating the style of increment. 0 = increment, 1 = smooth
LargeChange Numeric, Returns/sets the increment value when the PageDown or PageUp key is pressed
SmallChange Numeric, Returns/sets the increment value when the left or right arrow key is pressed
TickFrequency Integer, Gets or sets the interval between the Tick Marks
ChangeWhenFocused Logical, 
TickCount Integer. Returns or sets a value indicating number of lines to display
TickColor Integer, Returns or sets the tic line color
TickSize Integer. The size of the tic lines in pixels
TickMargin Integer. The distance in pixels from border of the control to the left or top edge of the tic marks

Integer, (1-4) Returns/sets a value indicating where ticks appear on a Slider control:

  • 1 = None;
  • 2 = Both Ticks;
  • 3 = Top/Left;
  • 4 = Botton/Right
TickDisabledColor Integer, Returns or sets the tic line disabled color
Scroll Event, Occurs when you move the slider on a Slider control, either by clicking on the control or using keyboard commands.  You can use this event to perform calculations to manipulate controls that must be coordinated with ongoing changes in the Slider control.



1 - Toss one instance of the XSLIDER class from your VCX at the Project manager into your form.

2 - Right click the control, select properties, select the "Favorites" tab, to see the properties that you can customize.

3 - Set the main properties: "Min", "Max", "StyleControl" and your done!!!








Last edited Dec 5, 2014 at 3:00 AM by VfpImaging, version 10