简体   繁体   中英

Getting values from 'trackbar' and using this value for something else

Language: C#

IDE: Visual Studio 2013

Question: How do I set values to a trackbar in VS and then use these values as a variable for another process of my program.

Example: Game Difficulty - Player chooses difficulty on the track bar, then this integer value is then used as a speed variable for how fast a ball moves.

The tick frequency allows you to set a value for each of the ticks, so if your tick frequency starts at 10, then your first location would be 10, next 20 and so on.

To get this value from the trackbar , you have to use 'nameOfTrackbar'.Value .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM