以可变频率执行按钮操作

发布于 2024-07-17 08:51:11 字数 196 浏览 7 评论 0原文

我想制作一个按钮,根据 Visual Basic .NET 中输入的数字的频率来运行操作。 我该怎么做? 有人能指出我这样一个动作的语法吗?

@Jon,我认为那是C++,我说的是VB.Net。

@Adam Davis,VB.Net 3.5,我想做的就是使用“NumericUpDown”中的数字来给按钮指定按钮必须执行的操作次数。

I want to make an button that runs an action with the frequency from an number input in Visual Basic .NET . How do I do it? Could someone point me out the syntax of such an action?

@Jon, I think that's C++, I am talking about VB.Net.

@Adam Davis, VB.Net 3.5 and all that I want to do is use an number from "NumericUpDown" to give a button how many times the action the button has to do it.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

戏舞 2024-07-24 08:51:11
    Dim i as integer

    For (i = 1 To InputNumber)
       'Code here
    Next
    Dim i as integer

    For (i = 1 To InputNumber)
       'Code here
    Next
安穩 2024-07-24 08:51:11

这应该可以解决问题。

    For i As Integer = 0 To CInt(NumericUpDown1.Value)
        'Code to execute 
    Next

This should do the trick.

    For i As Integer = 0 To CInt(NumericUpDown1.Value)
        'Code to execute 
    Next
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文