Create a smooth progress bar in Visual C #. NET

Source: Internet
Author: User
Content
Overview
Create a custom progress bar control
Create a simple client application
--------------------------------------------------------------------------------
Overview
This article describes how to create a simple, custom user control-a smooth progress bar.
In the earlier version of the progress bar control, for example, the version provided in the Microsoft Windows Common Controls ActiveX control, you can see that the progress bar has two different views. You can set the Standard view or Smooth View by setting the Scrolling attribute.
The Smooth view provides an area for Smooth display of the progress. Standard tries to show that the progress is represented by a block.
The progress bar control provided in Visual C #. NET only supports Standard views.
The sample code in this article shows how to create a control with the following attributes:
Minimum. This attribute indicates the minimum value of the progress bar. The default value is 0. You cannot set this attribute to a negative value.
Maximum. This attribute indicates the maximum value of the progress bar. The default value is 100.
Value. This attribute indicates the current value of the progress bar. The value must be between Minimum and Maximum.
ProgressBarColor. This attribute indicates the color of the progress bar.
Return
--------------------------------------------------------------------------------
Create a custom progress bar control
1. Follow these steps to create a Windows Control Library project in Visual C #. NET:
A. Open Microsoft Visual Studio. NET.
B. Click the File menu, New, and Project.
C. In the New Project dialog box, select Visual C # Projects in Project Types, and then select Windows Control Library in Templates.
D. In the Name box, fill in the SmoothProgressBar and click OK.
E. In Project Explorer, rename the default class module and change UserControl1.cs to SmoothProgressBar. cs.
F. In the Property window of the UserControl object, change its Name attribute from UserControl1 to SmoothProgressBar.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.