Fórum como faço para utilizar meus cursores nos sistemas e no delp #216071
23/02/2004
0
[color=blue:5092d7fda9][/color:5092d7fda9]como faço para utilizar meus cursores nos sistemas?
Posso adicionar eles no proprio delphi?ultilizando como uma especie de componente?
existe alguma linha de comando especial para o proprio delphi utilizar outros cursores e utiliza-los em qualquer outro projeto?
Obrigado!
ASS:
JJ_Malka.
Posso adicionar eles no proprio delphi?ultilizando como uma especie de componente?
existe alguma linha de comando especial para o proprio delphi utilizar outros cursores e utiliza-los em qualquer outro projeto?
Obrigado!
ASS:
JJ_Malka.
Jj_malka
Curtir tópico
+ 0
Responder
Posts
23/02/2004
Aroldo Zanela
Colega,
Exemplo:
Lists the cursors available to the application.
property Cursors[Index: Integer]: HCursor;
Description
Use Cursor to access a particular cursor for use by the application or by a control within the application. TScreen includes several built-in cursors that are indexed by symbolic cursor constants. The image associated with the built-in cursors constants can be changed by setting the Cursors property.
Custom cursors can be added to the Cursors property for use by the application or any of its controls. To add a custom cursor to an application:
1Create the cursor resource using a resource editor.
2Declare a cursor constant with a value that does not conflict with an existing cursor constant.
3Use the Windows API function LoadCursor to obtain a handle to the new cursor.
4Set the Cursors property, indexed by the newly declared cursor constant, to the handle obtained from LoadCursor.
Note:Don’t call the Windows API function DestroyCursor when finished with a custom cursor; Delphi does this automatically.
Exemplo:
const
crMyCursor = 5;
var
Form1: TForm1;
implementation
{$R *.dfm}
{$R c:\cursores.res} // Localização e nome do arquivo de recursos criado com o Image Editor
procedure TForm1.FormCreate(Sender: TObject);
begin
Screen.Cursors[crMyCursor] := LoadCursor(HInstance, ´CURSOR_TESTE´);
Screen.Cursor := crMyCursor;
end;
Responder
Gostei + 0
Clique aqui para fazer login e interagir na Comunidade :)