VB的全新功能-如何从组中随机选择? [英] Brand new to VB - how randomly select from a group?

查看:94
本文介绍了VB的全新功能-如何从组中随机选择?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我有兴趣制作一个程序,从我将要填充的一组健身运动中随机填充这些运动.例如,我希望能够检查肱三头肌"然后出现肱三头肌回弹"从更多的练习中弹出,然后 下次单击它时,将弹出另一个三头肌锻炼.

I am interested in making a program to randomly populate gym-exercises from a group of them that I will populate.  For instance, I want to be able to check "triceps," and then have "triceps kickback" pop up from a larger group of exercises, and the next time I click it another triceps exercise will pop up.

我是VB的新手,今天才刚开始使用它.我在网上找不到任何有关此的信息.  是否有一种简单的方法可以做到这一点?

I am brand new to VB and have just started playing around with it today.  I can't find anything about this on the web.  Is there a simple way to go about doing this?

非常感谢

推荐答案

Polyknikes,

Hi Polyknikes,

其他用户之一可能会指出,这可能是一种更简单的方法.但是您可以通过这种方式做到这一点:

There's probably an easier way to do this, as one of the other users might point out. But this one way you could do it:

也许每个随机运动"到一个号码相关联,则当被选中的通用术语,如三头肌,有产生选择哪个子运动是必须要做的随机数?您可以有多个子列表,也可以有一个很大的子列表,只需指定

Perhaps associate each 'random exercise' to a number, then when a general term such as triceps is selected, have a random number generated to select which sub-exercise is to be done? You can either have several sub-lists, or a large one and just specify where the random number is called from.


这篇关于VB的全新功能-如何从组中随机选择?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆