- 关 键 词:
- crm
?建立工程与一个资源档
用Image Editor编辑一个鼠游标
(Fild | New | Resource File)
新建一个 CURSOR_1 的 CURSOR, 设定好它的 Hot Spot
(Cursor | Set Hot Spot)
存档时注意要和建立的Project存在同一个目录在本例我们先假定为 MyCursor.res
二. 程序部分
定义一个常数crMyCursor, 这个常数您必须设成大於零的任何整数, 以 LoadCursor() 函数将自订的鼠标资源 load 进来, 以下为源代码:
// unit.pas
unit Unit1;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes,
Graphics, Controls, Forms, Dialogs;
const
crMyCursor = 1; (* 宣告一个常数 *)
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
{$R mycursor.res}//这行$R不可少, 否则自订的鼠游标就出不来
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
//将鼠标资源 load 进来
Screen.Cursors[crMyCursor] := LoadCursor
(hInstance,CURSOR_1);
Cursor := crMyCursor;//指定 form1 的 cursor 自订鼠标
Button1.Cursor := crMyCursor;//指定Button1的cursor为自订?
标
end;
end.
--专题:http://www.qqread.com/vc/x920923020.html进入讨论组讨论。
用Image Editor编辑一个鼠游标
(Fild | New | Resource File)
新建一个 CURSOR_1 的 CURSOR, 设定好它的 Hot Spot
(Cursor | Set Hot Spot)
存档时注意要和建立的Project存在同一个目录在本例我们先假定为 MyCursor.res
二. 程序部分
定义一个常数crMyCursor, 这个常数您必须设成大於零的任何整数, 以 LoadCursor() 函数将自订的鼠标资源 load 进来, 以下为源代码:
// unit.pas
unit Unit1;
interface
uses
SysUtils, WinTypes, WinProcs, Messages, Classes,
Graphics, Controls, Forms, Dialogs;
const
crMyCursor = 1; (* 宣告一个常数 *)
type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
{$R mycursor.res}//这行$R不可少, 否则自订的鼠游标就出不来
implementation
{$R *.DFM}
procedure TForm1.FormCreate(Sender: TObject);
begin
//将鼠标资源 load 进来
Screen.Cursors[crMyCursor] := LoadCursor
(hInstance,CURSOR_1);
Cursor := crMyCursor;//指定 form1 的 cursor 自订鼠标
Button1.Cursor := crMyCursor;//指定Button1的cursor为自订?
标
end;
end.
--专题:http://www.qqread.com/vc/x920923020.html进入讨论组讨论。
相关图文阅读
频道图文推荐
健 康 咨 询
时 尚 咨 询



