C # winform Development Series-textbox

Source: Internet
Author: User

Include the amount/Date input box, the calculation input box with the pop-up number panel, Security Password Input and other controls (ArticleAnd RelatedCodeCollected from the Internet for reference only. The copyright belongs to the original author! ).

1. calculatorbox calculatorbox.rar

2. textbox with row number + custom color display

3. Amount input box currency_textbox.zip currencybox.rar numberpicker_src.zip numerictextbox_src.zip numberedtextbox.rar

4. Date input box dateedit.rar

5. a c # numeric field control

6. Extended RichTextBox function richtextboxextended.zip

7. C # IP address control

8. Anders Cui
Unified Data Verification using custom components in Windows Forms (1)
Unified Data Verification using custom components in Windows Forms (2)
Input verification control in the win form program
Drag and Drop text from a file to the Textbox Control
C # mining the topology of Internet domain names

9. Prevent keylogger Password Input dialog box

10. Office 2007 ribbon-style buttons and menus [reprinted]

Translation

Juan Pablo G. C. Improved and recoded ribbonmenubutton

Introduction

First, thank you. I am very grateful to you for your high comments on the efforts made in this article. I remember when I was 16 years old, I saw a variety of software and applications.ProgramAnd games, and for me, it was impossible to achieve or develop such software. However, since then, I have learned a lot and now I have been able to easily complete such software. Moreover, if I can help anyone implement brilliant applications, I decide they can use my code freely.

Background

Previously, I have been thinking about how to make a fully Customized button and how difficult it is to change the RGB element. I decided to make a class ribboncolor that can provide many operation colors. If you run the demo program and move the hue, SAT, or brightness trackbar, you will soon understand what I said above. I must acknowledge that nearly 70% of the ribboncontrol linked libraries have been completed. However, when people are eager to use improved code and tell me that I have not explained much about my code, I decided to treat myself as a dumb person. :)

How to use code

First, create a new windows application. In the solution browser, select the add existing item option, and then select the ribbonmenubutton. CS file to recompile your project. In this case, if you click Form Designer, a new subitem ribbonmenubutton will appear in the toolbox. Drag it to your form. On the surface, we cannot see the particularity of the control. However, please refer to the property browser. First, set the attribute for ribbonmenubutton.

After you set the attributes, add an image and set the text. If there is any, you can also set the font to segoe UI. Then, the button will look like the following:

If you have compiled the project and obtained the result, the next thing is to change the properties of the control. Let's see what each attribute means. We recommend that you take a look at the properties of the buttons in the demo project:

Arrow: draw an arrow on the right or below. The arrow is drawn only when the double function is set to the another attribute.
Colors: I don't need to explain this. We recommend that you use the playground program to select your color.
Fadingspeed: fade-out speed between colors. 0 does not fade out.
Grouppos: Set rounded corners on the left and right sides.
Imagelocation: Set the image position, top, bottom, and left.
Imageoffset: the offset of the image relative to the border.
Maximagesize: restrict the image size so that the buttons are larger than the image size.
RADIUS: the radius of the rounded corner.
Showbase: If you want to display the basecolor and basestroke colors, set it to yes. Here, transparent is a fade-out color.
Splitbutton: create a double button. The Arrow opens the contextmenu and other components associated with it.
Splitdistance: arrow button size
Title: If this attribute is set to a non-null string, the control automatically bold the title and displays the text below it.
Text: If you have set a title and want to display the text in multiple lines, add "\ n" to it ".
Keeppress and ispressed: If keeppress is activated on some buttons, other controls in the Controller will lose the ispress attribute when one of them is pressed.

Interest

If you want to learn more about this control, we recommend that you take a look at these:
This. region: This is a good way to avoid transparent events.
Lineargradient: It makes gradient easier when multiple colors are used.
Measurestring: it is used to display the position of the text, because you must remove base. onpaint and complete everything by yourself, including the display text.
Transformcolors: includes the Alpha opacity method.
Drawarc: Finished rounded corner
Onmouseup: When splitbutton and ispressed are activated, some functions are completed.
Ribboncolor: the formula is Wikipedia and gimp. The built-in system. Drawing. color. gethue, sat, and brightness are not particularly useful.

Juan Pablo G. C.

I'm an electronic engineer, I did my end degree project at Astrophysical Institute and tech Institute. i'm HP procurve AIS and ASE helping at university, and I'm getting ready for Microsoft MCTs.
I live in Canary Islands. At the moment Im developing a CRM software for my company. I'm really interested know people getting the MCTs.
I'm an SQL Server and. net2.0 intermediate expert.

Take a look to my blog Juan Pablo G. C.
Overrider: http://overrider.blogspot.com/

About the author

Zxjing published an article:14Signature:
Attachment download (Click the original article link to download it) I will add the attachment Office 2007 ribbon tab and menu. rar

 

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.