Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

IDE Crash on OCX - Solved but not sure why. 1

Status
Not open for further replies.

TLowder

Programmer
Joined
Mar 20, 2002
Messages
224
Hello,

Not a big deal because its working now but I'm unsure as to why my solution was needed and why it worked. My program started crashing in the IDE when a particular form loaded (exe worked fine). As far as I know this started for no reason. I tested on two computers with the same results. After spending hours on this problem I decided to delete all instances of a control IsButton from a frame on the form and then it loaded fine. When readding the control in the frame it crashed again. After more testing I found I could leave the exact same IsButtons in the frame that were causing the crash still there and add a new IsButton directly on the form and then it worked fine. So now the new one is still there but just invisible. This button is in many of my forms on frames and they all work fine. When I first added this control it worked fine for as far as I know for about 6+ months. The IsButton.ocx is a user control I made into an OCX. Strange its always worked fine before and why would adding one directly to the form fix the crash.

Just wondering if anyone has any thoughts.

BTW the IsButton is pretty cool aside from this issue and can be found at planet source code.

Thanks,
Tom

Tom
 
Your OCX was likely in a different folder path when you first used it in your application.
 
A better solution than adding an invisible button would be this:
1.) Remove all isbuttons from your app
2.) Uncheck isbutton in the components window
3.) Save the application and close it
4.) Unregister the isbutton.ocx
5.) Place the isbutton.ocx in the location you plan to distribute. "system32", "app folder" etc.
6.) Register the isbutton.ocx
7.) Open application and add your isbutton
 
Thanks three57m,
I'm sure you have the right idea. I had some version update problems with the ocx when I first started using it and had created a new version. I had to remove it and uncheck the reference etc. back then 6 months ago. It probably would solve the issue doing what you recomend now. I'm not sure if I'm going to do it right away unless I have more problems with other forms, since I now have a lot more of these buttons throughout my whole project.

Thanks,
Tom

Tom
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top