下面的程序代码相信大家都能看的明白!
可是有错误,不知道怎么解决,所以向大家请教!
希望大家能帮帮,谢谢大家!代码:unit Unit1;interface
{$R face.res}
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
screen.Cursors[1] := LoadCursor(hInstance , PChar('faceleft')) ;
screen.Cursors[2] := LoadCursor(hInstance , PChar('faceright')) ;
screen.Cursors[3] := LoadCursor(hInstance , PChar('plainface')) ;
screen.Cursors[4] := LoadCursor(hInstance , PChar('leftshrink')) ;
screen.Cursors[5] := LoadCursor(hInstance , PChar('rightshrink')) ;
screen.Cursor := 3 ;end;procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button = MbLeft then
begin
screen.cursor := 4 ;
end ;
if Button = MbRight then
begin
screen.Cursor := 5 ;
end ;
end;procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
screen.cursor := 3 ;
end;end.
//错误提示:File not found 'face.res'
可是有错误,不知道怎么解决,所以向大家请教!
希望大家能帮帮,谢谢大家!代码:unit Unit1;interface
{$R face.res}
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;type
TForm1 = class(TForm)
procedure FormCreate(Sender: TObject);
procedure FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
procedure FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
private
{ Private declarations }
public
{ Public declarations }
end;var
Form1: TForm1;implementation{$R *.dfm}procedure TForm1.FormCreate(Sender: TObject);
begin
screen.Cursors[1] := LoadCursor(hInstance , PChar('faceleft')) ;
screen.Cursors[2] := LoadCursor(hInstance , PChar('faceright')) ;
screen.Cursors[3] := LoadCursor(hInstance , PChar('plainface')) ;
screen.Cursors[4] := LoadCursor(hInstance , PChar('leftshrink')) ;
screen.Cursors[5] := LoadCursor(hInstance , PChar('rightshrink')) ;
screen.Cursor := 3 ;end;procedure TForm1.FormMouseDown(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
if Button = MbLeft then
begin
screen.cursor := 4 ;
end ;
if Button = MbRight then
begin
screen.Cursor := 5 ;
end ;
end;procedure TForm1.FormMouseUp(Sender: TObject; Button: TMouseButton;
Shift: TShiftState; X, Y: Integer);
begin
screen.cursor := 3 ;
end;end.
//错误提示:File not found 'face.res'
希望大家帮帮忙呀?谢谢
请指示?