Slider Control in Visual Basic 6.0


A Slider control consists of a scale,defined by the minimum and maximum properties and a Arrow type button,which can be used to manipulate using the mouse or arrow keys.Slider Control  is the part of Microsoft Common Controls, With the Slider control you have any way to stop the value being printed as you move the slider by dragging

 

1.Click on “Start” . Then select “All Programs, Microsoft Visual Studio 6.0 and  Microsoft Visual Basic 6.0.” .

2. Select “Standard EXE” from the list in the New Project dialog box and click on “Open.” Click on “Project” on the menu bar, then select “Components” from the drop-down menu.

3. Scroll down the list in the box until Microsoft Windows Common Controls 6.0 (SP4) is visible. Click on the checkbox to select the component and then click on “OK.” All components show in the Toolbox.

4. Choose the “Slider” control from the list of controls in the toolbox. Place the control on the form in Visual Basic.

5. Also place one Label1 and Text1 control on the form1.

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

aa

6. Double click on Slider1 control.Code window is open.Write code here as shown in figure:

 

 

 

 

7.Press <F5> to run the program.You move the slider button.When you move the slider button the the text is shown in TextBox and the value of slider is shown in Label1.Output is shown in figure below:

 

 

 

 

 

 

 

 

 

 

 

Comments are closed.