Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Illegal Op in Class Browser after ctrl-W--AARRRGGHHH!
Message
 
 
To
07/07/1998 18:33:53
General information
Forum:
Visual FoxPro
Category:
Classes - VCX
Miscellaneous
Thread ID:
00114379
Message ID:
00115123
Views:
16
>I've got SP3 coming in within the next couple of days
>and it's reputed to fix this problem. I'll keep you
>posted.
>
Nope. SP3 does not fix this. I got the fix from:

http://support.microsoft.com/support/kb/articles/q167/5/28.asp

(courtesy from another thread). I dressed up the code a little:
*  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 
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform