怎样使一个WinForms进度条在C#中垂直移动? [英] How do I make a winforms progress bar move vertically in C#?

查看:510
本文介绍了怎样使一个WinForms进度条在C#中垂直移动?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作在C#一个WinForms点唱机。我想有音量控制一个垂直方向的进度。有谁知道该怎么做?

I'm working on a winforms jukebox in C#. I'd like to have a vertical progressbar for the volume control. Does anyone know how to do that?

推荐答案

我不知道,我会使用一个进度条为控制量,但为显示音量,你可以使用一个用户绘制控件或者你可以只调整与背景色的标签(即最后一个方法是一种缺憾虽然)

I don't know that I'd use a progress bar to control the volume, but to display the volume level you could use a user drawn control or you could just resize a label with a background color (that last method is kind of kludgy though)

进度条并不意味着接受输入,无论在什么方位。

The progress bar isn't meant to take input, no matter what the orientation.

如果你真的希望喜欢的控制卷,可以考虑使用一个垂直滚动条,或者用的垂直方向

If you really would like to control the volume, consider using a vertical scroll bar, or a trackbar with a vertical orientation.

有关它的价值,还有的,他们建议做这个垂直进度条microsoft.com/forums/en-US/winforms/thread/60b2493d-c8ff-495d-b845-d114fe456f54/\">a讨论:

For what it's worth, there's a discussion on how to create a vertical progress bar on MSDN, where they suggest doing this:

using System; 
using System.Windows.Forms; 

public class VerticalProgressBar : ProgressBar { 
  protected override CreateParams CreateParams { 
    get { 
      CreateParams cp = base.CreateParams; 
      cp.Style |= 0x04; 
      return cp; 
    } 
  } 
}



这台 PBS_VERTICAL 标志风格

这篇关于怎样使一个WinForms进度条在C#中垂直移动?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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