C # tips

Source: Internet
Author: User
Set the standard colors of the control:
System. Drawing. systemcolors

ASCII value between 0 and 9:
The ASCII value between 0 and 9 is 48 to 57, so the warranty character is in this region. An ASCII value of 8 indicates the unsigned limit.

The operation of the control is invalid.
The handled setting of keypresseventargs is set to true, telling the control not to perform any operations on the characters.

For example, obtain the child control in toolstrip.

// Obtain the child control in toolstrip by following the samples
// Follow the entire window (fronthelper. mfrmmain is a form)
Foreach (Control BTN In Fronthelper. mfrmmain. Controls)
{
// Determine whether javasbtn is a toolstrip Control
If (BTN Is Toolstrip)
{
Toolstrip TS =   New Toolstrip ();
// Convert the control BTN into a toolstrip Control
TS = (Toolstrip) BTN;
Foreach (Toolstripitem CTN In TS. Items)
{
// Judge whether the cTn is a toolstripbutton Control
If (CTN Is Toolstripbutton)
{
If (CTN. Tag ! =   Null )
{
If (CTN. Tag. tostring (). tolower () =   " New " )
{
CTN. Enabled =   False ;
}< BR >}< br>

how to set the window size in C # /// maximize hidden objects
form1.maximizebox = false ;
// Set the format of the window to fixed: fixed and one-stop window condition.
form1.formborderstyle = fixedsingle;

Activate the current user//Activate the environment (set the active window as before)
This. Activate ();

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.