【问题标题】:How to create a form that contains only a progress bar in c# [closed]如何在c#中创建一个只包含进度条的表单[关闭]
【发布时间】:2012-07-27 08:34:46
【问题描述】:

我想创建一个带有进度条的表单。表单没有任何按钮。它只有一个进度条来显示进程进度的百分比。
抱歉,我无法发布表格的图片。
请告诉我我该怎么做。

【问题讨论】:

  • 需要更多信息。您是想以编程方式创建它还是使用表单设计器???
  • 是什么阻止您在表单上放置一个控件?
  • 我想以编程方式创建它。
  • 谁能发一个例子给我? iman.yasouriATgmail

标签: c# progress-bar


【解决方案1】:

如果您想以编程方式创建它,那么您只需重新创建设计器为您预先构建的代码,然后根据您的需要对其进行调整,就像这样;

this.progressLoadingBar = new System.Windows.Forms.ProgressBar();
this.progressLoadingBar.Location = new System.Drawing.Point(10, 227);
this.progressLoadingBar.Name = "progressLoadingBar";
this.progressLoadingBar.Size = new System.Drawing.Size(100, 23);
this.progressLoadingBar.TabIndex = 9;
this.Controls.Add(this.progressLoadingBar);

这里。只需确保“this”是您表单的上下文。如果您想进一步调整,请使用智能感知并查看您的选项,否则 google 是您最好的朋友,可以在此处找到 MSDN 页面:

http://msdn.microsoft.com/en-us/library/system.windows.forms.progressbar.aspx

【讨论】:

    猜你喜欢
    • 2022-01-17
    • 1970-01-01
    • 2016-07-16
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2020-05-28
    相关资源
    最近更新 更多