All articles| All Pictures| All Softwares| All Video| Go home page| Write articles| Upload pictures

Reading number is top 10 articles
delphi设置代码模板
每个开发人员现在应该下载的十种必备工具,3_[Asp.Net教程]
全面接触SQL语法(4)_[SQL,Server教程]
让我们来编写一些PHP实用的脚本_php资料_编程技术
数据库正规化和设计技巧(3)_mssql学习_编程技术
Visual,Studio,2008,简体中文版下载_[Asp.Net教程]
《Effective,C#》:值类型和引用类型_[Asp.Net教程]
IIS运行不了ASP.NET的解决办法_[Asp.Net教程]
delphi MapViewOfFile函数将映像文件映射到进程
PHP程序设置变量的方法_[PHP教程]
Reading number is top 10 pictures
小学生考试又现神作--还有外国的
[猫扑大杂烩]华东师范墙上看到的捐精告示 15毫升3600元
The world's ten biggest attractions of inventory super the moon
穷哥们向美女求婚攻略
The money of more than 100 countries and regions8
全身蕾丝丝质美臀
战场废物1
Plump, too plump!2
运动的范冰冰2
Ashlynn Brooke a group sexy photo4
Download software ranking
I'm come from Beijing2
SP4 for SQL2000
天龙八部最新服务端
中国结婚习俗实录
变速齿轮3.26
Rio big adventure
Tram sex maniac 2 (H) rar bag3
传奇私服架设教程
Tram sex maniac 2 (H) rar bag18
Tram sex maniac 2 (H) rar bag10
qq published in(发表于) 2014/7/11 9:19:32 Edit(编辑)
C#中定义鼠标指针形状的方法实例

C#中定义鼠标指针形状的方法实例

C#中定义鼠标指针形状的方法实例|方法

定义鼠标指针形状

在Windows应用程序中,通过设置控件的Cursor属性可以定义鼠标指针的显示形状。控件(如Button控件)的Cursor属性用于设置鼠标指针的类型,默认值为Default。

语法:

public virtual Cursor Cursor { get; set; }

属性值:一个Cursor,表示当鼠标指针位于控件上时显示的光标。

Cursor:是一个值,该属性值如表1所示。

表1 Cursor属性的值



示例

设置控件的Cursor属性值

本示例将Windows窗体上的各个Button按钮的Cursor属性值设置为不同的值。Button控件的属性设置如图1所示,示例运行结果如图2所示。



图1 设置属性值



图2 示例运行结果

完整程序代码如下:

★ ★★★★frmMousePointer.cs窗体代码文件完整程序代码网站源代码★★★★★

using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Drawing;

using System.Text;

using System.Windows.Forms;

namespace _2_01

{

public partial class frmMousePointer : Form

{

public frmMousePointer()

{

InitializeComponent();

}

private void frmMousePointer_Load(object sender, EventArgs e)

{

}

private void frmMousePointer_Load_1(object sender, EventArgs e)

{

}

}

}

★ ★★★★frmMousePointer.Designer.cs窗体设计文件完整程序代码★★★★★

namespace _2_01

{

partial class frmMousePointer

{

///



/// 必需的设计器变量。

///


private System.ComponentModel.IContainer components = null;

///

/// 清理所有正在使用的资源。

///


/// 如果应释放托管资源,为 true;否则为 false。

protected override void Dispose(bool disposing)

{

if (disposing && (components != null))

{//本教程来自:http://www.isstudy.com

components.Dispose();

}

base.Dispose(disposing);

}

#region Windows 窗体设计器生成的代码

///

/// 设计器支持所需的方法 - 不要

/// 使用代码编辑器修改此方法的内容。

///


private void InitializeComponent()

{

this.button1 = new System.Windows.Forms.Button();

this.button2 = new System.Windows.Forms.Button();

this.button3 = new System.Windows.Forms.Button();

this.button4 = new System.Windows.Forms.Button();

this.button5 = new System.Windows.Forms.Button();

this.button6 = new System.Windows.Forms.Button();

this.button7 = new System.Windows.Forms.Button();

this.button8 = new System.Windows.Forms.Button();

this.button9 = new System.Windows.Forms.Button();

this.button10 = new System.Windows.Forms.Button();

this.button11 = new System.Windows.Forms.Button();

this.button12 = new System.Windows.Forms.Button();

this.button13 = new System.Windows.Forms.Button();

this.button14 = new System.Windows.Forms.Button();

this.button15 = new System.Windows.Forms.Button();

this.button16 = new System.Windows.Forms.Button();

this.button17 = new System.Windows.Forms.Button();

this.button18 = new System.Windows.Forms.Button();

this.button22 = new System.Windows.Forms.Button();

this.button23 = new System.Windows.Forms.Button();

this.button24 = new System.Windows.Forms.Button();

this.button25 = new System.Windows.Forms.Button();

this.button26 = new System.Windows.Forms.Button();

this.button27 = new System.Windows.Forms.Button();

this.button28 = new System.Windows.Forms.Button();

this.SuspendLayout();

//

// button1

//

this.button1.Cursor = System.Windows.Forms.Cursors.Hand;

this.button1.Location = new System.Drawing.Point(12, 12);

this.button1.Name = "button1";

this.button1.Size = new System.Drawing.Size(75, 23);

this.button1.TabIndex = 0;

this.button1.Text = "Hand";

this.button1.UseVisualStyleBackColor = true;


添加到del.icio.us 添加到新浪ViVi 添加到百度搜藏 添加到POCO网摘 添加到天天网摘365Key 添加到和讯网摘 添加到天极网摘 添加到黑米书签 添加到QQ书签 添加到雅虎收藏 添加到奇客发现 diigo it 添加到饭否 添加到飞豆订阅 添加到抓虾收藏 添加到鲜果订阅 digg it 貼到funP 添加到有道阅读 Live Favorites 添加到Newsvine 打印本页 用Email发送本页 在Facebook上分享


Disclaimer Privacy Policy About us Site Map

If you have any requirements, please contact webmaster。(如果有什么要求,请联系站长)
Copyright ©2011-
uuhomepage.com, Inc. All rights reserved.