//rc 文件:
cur1 CURSOR cur\kyodai.cur
cur2 CURSOR cur\static.cur

//或者
cur1,CURSOR,cur\kyodai.cur
cur2,CURSOR,cur\static.cur

//程序代码: unit Unit1; interface uses Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms, Dialogs, ExtCtrls; type TForm1 = class(TForm) Panel1: TPanel; Panel2: TPanel; procedure FormCreate(Sender: TObject); end; var Form1: TForm1; implementation {$R *.dfm} procedure TForm1.FormCreate(Sender: TObject); begin Screen.Cursors[1] := LoadCursor(HInstance, 'cur1'); Screen.Cursors[2] := LoadCursor(HInstance, 'cur2'); Panel1.Cursor := TCursor(1); //Panel1.Cursor := 1; 也可, 因为 TCursor 就是个数字类型. Panel2.Cursor := TCursor(2); end; end.
//效果图:


posted on 2008-02-14 19:09  万一  阅读(4004)  评论(4编辑  收藏  举报