Code for modifying the Mouse shape

Source: Internet
Author: User


The system method is called mainly because it takes a long time for the mouse to be developed. It takes a long time to find the method and stay here to commemorate it.
Public class Grid: GoldSoft. Inf. UI. Controls. Grid. Grid
{
/// <Summary>
/// Required designer variables.
/// </Summary>
Private System. ComponentModel. Container components = null;

Public Grid ()
{
// This call is required by the Windows. Forms Form Designer.
InitializeComponent ();
// TODO: add any initialization after the InitComponent call
This. MouseMove + = new MouseEventHandler (n_MouseMove );
}
Private void n_MouseMove (object sender, System. Windows. Forms. MouseEventArgs e)
{
This. Cursor = Cursors. SizeWE;
// The above is used to modify the Mouse shape. You can see it in Cursors.
Console. WriteLine ("====> Test <== (" + e. X + "," + e. Y + ")");
}
/// <Summary>
/// Clear all resources in use.
/// </Summary>
Protected override void Dispose (bool disposing)
{
If (disposing)
{
If (components! = Null)
Components. Dispose ();
}
Base. Dispose (disposing );
}
# Code generated by the region component designer
/// <Summary>
/// The designer supports the required methods-do not use the code editor
/// Modify the content of this method.
/// </Summary>
Private void InitializeComponent ()
{
Components = new System. ComponentModel. Container ();
}
# Endregion
}

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.