CaptureEXE Example for Delphi 4.0
LEADScr1.TransparentColor := clWhite;
LEAD1.TransparentColor := clWhite;
LEAD1.UseTransparentColor := True;
{capture by string resource id}
LEADScr1.CaptureEXE('c:\windows\calc.exe', CAPTURE_ICON, 'sc', False, False);
LEAD1.Bitmap := LEADScr1.Bitmap;
ShowMessage('Wait');
{now, capture by numeric resource id}
LEADScr1.CaptureEXE('c:\windows\defrag.exe', CAPTURE_ICON, '111', True, False);
LEAD1.Bitmap := LEADScr1.Bitmap;
ShowMessage('Wait');
{finally, capture by resource index}
LEADScr1.CaptureEXE('c:\windows\calc.exe', CAPTURE_ICON, '0', True, True);
LEAD1.Bitmap := LEADScr1.Bitmap;
ShowMessage('Wait');