OnCaptureHotKeyPressed Example for Builder 3.0

void __fastcall TForm1:: LEADScr1CaptureHotKeyPressed (TObject *Sender,

      int nHotKeyType)

{

    int ret;

    bool bRet ;
    ret = MessageDlg("  you want to capture?", mtConfirmation, TMsgDlgButtons() << mbYes << mbNo, 0);
    if ( (ret == mrNo) )
    {
        bRet = LEADScr1->IsCaptureActive();
        if ( (bRet) )
            /*cancel the capture*/
            LEADScr1->StopCapture();
    }
}