M Miros Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-27 #2 procedure TForm1.Button1Click(Sender: TObject); const MyCursorID = 200; begin Screen.Cursors[MyCursorID] := LoadCursorFromFile('./MyCur.cur'); if Screen.Cursors[MyCursorID] <> 0 then Cursor := Screen.Cursors[MyCursorID]; end;
procedure TForm1.Button1Click(Sender: TObject); const MyCursorID = 200; begin Screen.Cursors[MyCursorID] := LoadCursorFromFile('./MyCur.cur'); if Screen.Cursors[MyCursorID] <> 0 then Cursor := Screen.Cursors[MyCursorID]; end;
U ufo Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-27 #3 cur文件是静态光标,楼主应该载入ani动画光标会更好看。比如 screen.Cursors[2]:= loadcursorfromfile(pchar(path+ '010.ani')); screen.Cursors[3]:= loadcursorfromfile(pchar(path+ '011.ani')); screen.Cursors[4]:= loadcursorfromfile(pchar(path+ '012.ani')); 使用方法同楼上。
cur文件是静态光标,楼主应该载入ani动画光标会更好看。比如 screen.Cursors[2]:= loadcursorfromfile(pchar(path+ '010.ani')); screen.Cursors[3]:= loadcursorfromfile(pchar(path+ '011.ani')); screen.Cursors[4]:= loadcursorfromfile(pchar(path+ '012.ani')); 使用方法同楼上。
M modula-2 Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-27 #4 very thanks 但是如果要把光标文件编译到程序中又该如何搞?
U ufo Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-27 #5 http://www.delphibbs.com/delphibbs/dispq.asp?lid=2363558
M Miros Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-27 #6 但是如果要把光标文件编译到程序中又该如何搞? !倒!这问题不想回答了。您还是去看看怎么做资源文件吧!
U ufo Unregistered / Unconfirmed GUEST, unregistred user! 2007-05-27 #7 对啊,资源文件就是编译到同一个程序内的啊。 就算您在程序内定义了一个字符串常量,delphi也是把它放到资源内的。