C # certification Exam Chapter III

Source: Internet
Author: User

PS: Because the front leave, not in the time to make a summary, now fill in

If you look at the third chapter, you will find that the third chapter focuses on the design of Windows Forms, including the form background, foreground color, font color, location, and so on.

Because it is a form program, and because the results of test instructions run a variety of, I do not paste the code and run the result diagram.

Below I will simply paste a code, because the latter, although different, but the logic is similar, nothing is different requirements need different methods.

Using System;
Using System.Collections.Generic;
Using System.ComponentModel;
Using System.Data;
Using System.Drawing;
Using System.Linq;
Using System.Text;
Using System.Threading.Tasks;
Using System.Windows.Forms;

Namespace Test3_1
{
public partial class Form1:form
{
Public Form1 ()
{
InitializeComponent ();
}

private void large Toolstripmenuitem1_click (object sender, EventArgs e)
{
This. Size = new System.Drawing.Size (600, 400);
Toolstripstatuslabel1.text = "large form";
}

private void in Toolstripmenuitem1_click (object sender, EventArgs e)
{
This. Size = new System.Drawing.Size (300,200);
Toolstripstatuslabel1.text = "Medium form";
}

private void small Toolstripmenuitem1_click (object sender, EventArgs e)
{
This. Size = new System.Drawing.Size (150, 120);
Toolstripstatuslabel1.text = "small form";
}

private void Button1_Click (object sender, EventArgs e)
{
This. Size = new System.Drawing.Size (600, 400);
Toolstripstatuslabel1.text = "large form";
}

private void Button2_Click (object sender, EventArgs e)
{
This. Size = new System.Drawing.Size (300, 200);
Toolstripstatuslabel1.text = "Medium form";
}

private void Button3_Click (object sender, EventArgs e)
{
This. Size = new System.Drawing.Size (150, 120);
Toolstripstatuslabel1.text = "small form";
}

}

According to test instructions, we need to display the result of the change of the form, which requires a control named Stripstatus.
This control shows the form state in the following ways:

Select this option after you drag the control in.

To implement the menu for test instructions requirements, the process is as follows:

1, locate the control named MenuStrip1, and pull the form into the

Enter your menu name according to its prompts, and then design the submenu according to the test instructions

Specific algorithm, please refer to my above code, I will not post the results of the operation.

C # certification Exam Chapter III

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.