VB.NET VScrollBar,反向功能
我希望反转 VB.NET 中 VScrollBar 的功能 - 我希望数字在按下向上按钮时增加,在按下向下按钮时减少。
令我惊讶的是,这个问题在网上并不常见,但我在网上找不到任何关于使 VScrollBar 在 VB.NET 中按照我希望的方式工作的信息。显然,在 VB 6.0 中,您可以翻转最小值和最大值,这实现了我想要做的事情,但他们在 VB.NET 中删除了该功能。有人知道如何实现这一目标吗?非常感谢任何帮助。
I'm looking to reverse the functionality of a VScrollBar in VB.NET - I would like the number to increase when the up button is pressed and decrease when the down button is pressed.
I'm surprised that this issue isn't more commonly represented online, but I could find nothing online about making a VScrollBar work the way I want it to in VB.NET. Apparently in VB 6.0, you were able to flip the Min and Max values and this achieved what I desire to do, but they removed that feature in VB.NET. Anyone have an idea of how this might be achieved? Any help is much appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
反转一个值很容易,无论是否滚动条:
如果你需要最小值,那也没关系:
It's easy to reverse a value, scroll bar or not:
If you need a minimum, that's okay too:
只需执行
minimum = -1000
和maximum = 0
即可。然后
结果 = VScrollbar.Value * -1
。现在方向是从下到上。
Just do
minimum = -1000
andmaximum = 0
.Then
Result = VScrollbar.Value * -1
.Now direction is from down to up.