1

I have a Form "TForm1" having one "TAnimate1". I have one AVI Resource as File Name "Animate 01.avi" with Resource Identifier "AVI" and one "Animated Cursor" as File Name "Cursor 01.ani" with Resource Identifier "8".

I wish to play "Animate 01.avi" on "FormCreate" event and set default cursor as "8".

I'm using "Delphi XE2".

RRUZ
  • 134,889
  • 20
  • 356
  • 483
Koushik Halder
  • 445
  • 1
  • 9
  • 15

1 Answers1

2

To load an avi in a TAnimate from a resource, you must use the ResHandle and ResId or ResName properties.

if you have the id of the resource use a code like this

  Animate1.ResHandle:=HInstance;
  Animate1.ResId    :=2;//this is the id of the resource

if you have the name of the resource

  Animate1.ResHandle:=HInstance;
  Animate1.Resame :='MyAvi';//this is the name of the resource

to load a cursor from a resource you must use the LoadCursor function

Screen.Cursors[NIndex] := LoadCursor(HInstance, '8');//or if you are using a number instead an string LoadCursor(HInstance, MAKEINTRESOURCE(8))
RRUZ
  • 134,889
  • 20
  • 356
  • 483
  • Please download and see my Project File and tell me where to recify. Please please help me. Download link "http://hotfile.com/dl/137675080/34f701f/KoushikHalder01.7z.html" – Koushik Halder Dec 16 '11 at 17:47