CaptureActiveWindow Example for Visual Basic

'set custom status cursor
    LEADRasterScr1.CaptureStatusCursor = LoadPicture("d:\temp\test.cur")
    LEADRasterScr1.CaptureStatusCursorIndex = 99
    
    'set cancel key to ESC
    LEADRasterScr1.CaptureCancelKey = vbKeyEscape
    
    LEADRasterScr1.CaptureDelay = 5000    'wait 5 secs before starting
    LEADRasterScr1.CaptureInterval = 1000 'capture every second
    LEADRasterScr1.CaptureCount = 25      'capture 25 images
    
    'start the captures
    LEADRasterScr1.CaptureActiveWindow
    
    'display the results
    Text1.Text = LEADRasterScr1.CaptureInfohWnd