CaptureEXE Example for Visual Basic
LEADRasterScr1.TransparentColor = vbWhite
'capture by string resource id
LEADRasterScr1.CaptureEXE "c:\windows\calc.exe", SCR_CAP_ICON, "sc", False, False
LEADRasterView1.Raster.Bitmap = LEADRasterScr1.Bitmap
LEADRasterView1.Raster.BitmapTransparentColor = vbWhite
LEADRasterView1.Raster.BitmapEnableTransparency = True
MsgBox "wait"
'now, capture by numeric resource id
LEADRasterScr1.CaptureEXE "c:\windows\defrag.exe", SCR_CAP_ICON, "111", True, False
LEADRasterView1.Raster.Bitmap = LEADRasterScr1.Bitmap
MsgBox "wait"
'finally, capture by resource index
LEADRasterScr1.CaptureEXE "c:\win98\calc.exe", SCR_CAP_ICON, "0", True, True
LEADRasterView1.Raster.Bitmap = LEADRasterScr1.Bitmap
MsgBox "wait"