Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6172939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T23:28:50+00:00 2026-05-23T23:28:50+00:00

I have an ocx that can sometimes cause an internal application error when calling

  • 0

I have an ocx that can sometimes cause an “internal application error” when calling one of it’s methods in vfp9.

I’ve tried using on error and try/catch. For both, instead of getting the error, I get the Microsoft Visual ForPro has encountered a problem and needs to close…. Send Error Report/Don’t Send dialog.

This is what my code looks like.

on error code (note that I never see the wait window):

LOCAL lcOnError
PUBLIC glErrorResult
glErrorResult = .F.
lcOnError = ON('ERROR')
ON ERROR glErrorResult = .T.

This.oOCXControl.Method()

IF glErrorResult
  WAIT WINDOW 'error'
ENDIF
ON ERROR &lcOnError
RELEASE glErrorResult

try/catch code (again, I never see the wait window):

Local oError as Exception
Try
  This.oOCXControl.Method()
Catch to oError When .T.
  WAIT WINDOW 'error'
EndTry

Is there anything else I could try to handle the error to prevent my app crashing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T23:28:51+00:00Added an answer on May 23, 2026 at 11:28 pm

    So you have a misbehaving OCX control. I’ll assume you’ve already considered options like replacing it with another vendor’s control, or checking for updates. As far as being able to handle the error, I’m not aware of anything you can do that you haven’t already tried. It sounds like the control is such a deviant it is destroying VFP’s ability to continue executing.

    Consider how you’re using the control and look for places where you may be breaking the manufacturer’s rules. Especially look for places where you might be encouraging the control to leak memory. Odds are there is a problem building in the control that finally bursts when hitting this line of code.

    For example, I had an experience with an old grid control that has certain memory limits. If trying to add too many items to the grid, it didn’t throw an error, instead it just appeared to leak memory into VFP’s processing space and would eventually take the app down. The simple answer was to not try to add a ton of items to the grid.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Today we have a windows application that, using an OCX, creates a web page
I am creating C# application that uses OCX component. I have this component from
I have an old VB6 application that depends on MSINET.OCX. I'd like to know
I'm getting an error that is baffling me complete. I have a .NET Application
I have a VB6 application that still references some old VB5 libraries (dll, vbr,
The reason I am asking is I have an ocx that I don't want
I have a legacy vb6 application that needs to run on a server 2008
I have been trying to load a OCX file into one of my VB6
Say we have an existing process (or application) that calls a COM object from
Can any one tell me how to convert an legacy application which is vb6

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.