* Program...........: Brwescfx.prg * Author............: Ken R. Levy * Copyright.........: None (Public Domain) * Description.......: VFP 5.0 Class Browser patch for 1-16-97 * COMCTL32.OCX bug. * Note: This add-in patch only fixes GPFs that occur when pressing * ESC to exit. * * Instructions for installation: * 1. Save Brwescfx.prg program file above into your VFP home/root * directory. * 2. Launch the Class Browser in VFP 5.0 and open any VCX. * 3. Run Barwescfx.prg to automatically register the BrwESCFx Class * Browser add-in. * 4. No more GPFs will occur using the Class Browser when pressing * ESC. (or Ctrl-W -- added by me) * LPARAMETERS oSource IF TYPE("oSource")#"O" OR ISNULL(oSource) IF TYPE("_oBrowser")#"O" OR ISNULL(_oBrowser) MESSAGEBOX("You must have the Class Browser running " + ; "to register BrwESCFx.", 48,"BrwESCFx") RETURN .F. ENDIF IF _oBrowser.AddIn("BrwESCFx",HOME()+"BrwESCFx","QueryUnload") MESSAGEBOX("BrwESCFx has successfully been " + ; "registered.",0,"BrwESCFx") RETURN ENDIF MESSAGEBOX("BrwESCFx failed to be registered.",16,"BrwESCFx") RETURN .F. ENDIF IF NOT oSource.cAddInMethod=="QUERYUNLOAD" RETURN .F. ENDIF IF TYPE("_screen.ActiveForm.ActiveControl")#"O" OR ; LOWER(LEFT(_screen.ActiveForm.ActiveControl.Name,3))=="ole" oSource.lNoDefault=.T. oSource.cboClassType.SetFocus KEYBOARD "{ESC}" PLAIN ENDIF RETURN * END PROGRAM: BrwESCFx.PRG