unit Unit1;interfaceuses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}
{$R ico.res}
procedure TForm1.Button1Click(Sender: TObject);
begin
screen.Cursors[2]:=LoadCursor(HInstance,'bb'); //从资源文件中载入却不可以
//screen.Cursors[2]:= LoadCursorFromFile('4WAY01.CUR'); //可以
Cursor:=2;
end;end.
ico.rc文件如下
aa ico "4WAY01.CUR"
bb ico "4WAY03.CUR"
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;type
TForm1 = class(TForm)
Button1: TButton;
procedure Button1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}
{$R ico.res}
procedure TForm1.Button1Click(Sender: TObject);
begin
screen.Cursors[2]:=LoadCursor(HInstance,'bb'); //从资源文件中载入却不可以
//screen.Cursors[2]:= LoadCursorFromFile('4WAY01.CUR'); //可以
Cursor:=2;
end;end.
ico.rc文件如下
aa ico "4WAY01.CUR"
bb ico "4WAY03.CUR"
解决方案 »
- 来深圳20天,简历发了5份,没人理
- 一个动态创建控件的问题,请各位大哥教教我!
- 急!怎么关于用NMSMTP发邮件的问题!
- 关于ms agent 的使用
- 关于TOleContainer控件的问题,求救高手。
- .xls文件存成.csv文件后怎么不能修改啦!V.WorkBooks[1].WorkSheets[2].saveas('d:\12345.csv',XLcsv,'789');
- 如何截取当前屏幕的图像?
- (delphi7)用TCoolTrayIcon控件来处理窗口的“最小化到托盘”,但如果瑞星杀毒软件开启,程序就不能编译运行,各位大虾,怎么办啊????
- 简单问题送50分
- 有李维的《Delphi5.x分布式多层应用》的电子书箱下载吗?
- 我的win7系统装Delphi7和sql2000都会出现错误
- 如何遍历网页中的坐标 获取某一颜色值的坐标 delphi webbrowser1中
LoadCursor
一个是ICO,一个是LoadCursor,能加载吗?我不知道啊。
资源文件应该是bb cursor "4WAY01.CUR"吧。
我没试,给点建议。