Winform dialog box and winform

Source: Internet
Author: User

Winform dialog box and winform

Public pop-up box help Operation Manual

1. Description

Some prompt boxes for winform operations are encapsulated, including prompts that the data is being loaded when the data loading time is elapsed. Please prompt the form later and dynamically prompt users with some useful information. For example, refer notifications in Internet cafes.

2. operation instructions

I. The normal bullet box prompt box is used for the feedback information after data loading or operation functions

Instance code:

// Display the pop-up box private void button2_Click (object sender, EventArgs e) {ViewHelper. BeginLoading ("hello, everyone! ");} // Close the pop-up box private void button4_Click (object sender, EventArgs e) {ViewHelper. closeLoading () ;}// the pop-up prompt box private void button3_Click (object sender, EventArgs e) {ViewHelper. showAutoCloseMsg ("operation successful! ") ;}// Error prompt box private void button5_Click (object sender, EventArgs e) {try {int a = 1; int B = 0; int t = a/B ;} catch (Exception ex) {ViewHelper. showErrMsg ("error:", ex );}}

The above Code includes the use of the main functions.

How to use it? Create a winform project, add a form1 form, and reference the rabbit. core. dll file to call ViewHelper.

II. How to achieve dynamic bullet box effects.

This is more user-friendly, and dynamic images cannot be uploaded, so you don't have to read it.

How to use it? On the basis of the original project, add a form2 form, modify the form to inherit a class named Dynamic in dll, and add the following code in the constructor. The Code is as follows:

Public partial class Form2: DynamicForm {public Form2 () {InitializeComponent (); DynamicForm. SetDeskLocation (this); // ensure that the box is displayed based on the current subform (this }}

Then we can construct rich pop-up information on form2 based on our own needs, and then call it to display it. We will bring it up in the form1 button. The effect is to imagine that the balance in the lower right corner of the Internet cafe is insufficient.

The call code is as follows:

// Dynamic prompt box private void button#click (object sender, EventArgs e) {ViewHelper. dynamicPopbyRightDown <Form2> (2000); // 2000 indicates that the pop-up box disappears after 2 seconds}

All of them are as follows:

The bullet box is slowly rising from bottom up in the lower right corner.

 

Download rabbit. core. dll

 

Qq: 739462304, welcome to exchange technology

Related Article

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.