Print Page | Close Window

Exception Error in VB.Net

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=16207
Printed Date: 27 September 2024 at 7:49pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Exception Error in VB.Net
Posted By: jmargel
Subject: Exception Error in VB.Net
Date Posted: 16 February 2010 at 2:07pm
In the VB.Net sample if I try to remove a menu item or a button, I get the following error:
 
Exception of type 'System.Windows.Forms.AxHost+InvalidActiveXStateException' was thrown.
 
http://www.pronet-systems.us/vbneterror.jpg - http://www.pronet-systems.us/vbneterror.jpg
 
Why is this happening?  I had to change to vb.net since I couldn't resolve my problem in access with your control.  I purchased the control last week and still have not gotten any response to the access problem I am having.



Replies:
Posted By: Oleg
Date Posted: 16 February 2010 at 4:28pm

Hello,

Please show code you tried.


-------------
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS


Posted By: SuperMario
Date Posted: 16 February 2010 at 4:34pm
And steps to reproduce


Posted By: jmargel
Date Posted: 17 February 2010 at 2:04pm
Take the sample VB.Net that comes with your application.  Delete one of the buttons (I deleted the new, open and save) and then run it again.  The error should appear.  If not, let me know and I can attach my application for you.


Posted By: jmargel
Date Posted: 18 February 2010 at 7:42am
It's frustrating because there doesn't seem to be anything that is pinpointing what is causing it.  I took the vb.net sample, changed it so that it opens my access database and I am able to add, edit, delete events.  I then removed one button (file open) and get that error.  So, I brought back my old code and just tried to set the visible to false on the tbrFileOpen button and get the same thing.  If I set the visible back to true that does not fix the problem.
 
I noticed if I close the project and unzip my working copy again into that directory I get the following error:
 
!   C:\calendarvbnet.zip: Cannot create VB.NET\CalendarControl\obj\Debug\AxInterop.XtremeCalendarControl.dll
!   The process cannot access the file because it is being used by another process.
!   C:\calendarvbnet.zip: Cannot create VB.NET\CalendarControl\obj\Debug\Interop.XtremeCalendarControl.dll
!   The process cannot access the file because it is being used by another process.
I have to physically close out vs2008 (beta 2) to unzip over it again.  Not sure if that has anything to do with this.
 
Is it because I am using vs2008?  I need to get this done so I can move onto other projects.  Thanks!


Posted By: jmargel
Date Posted: 18 February 2010 at 7:43am

You guys gave me a beta of version 14.0.  I tried it and get the same error.



Posted By: jmargel
Date Posted: 18 February 2010 at 7:45am
Sorry, I am not using VS2008, I am using VS2010 (beta 2).  Thanks.


Posted By: jmargel
Date Posted: 18 February 2010 at 8:13am
I put 'Try' 'Catch' statements around all the calendarcontrol statements.  When running in debug I get the following error:
 

A first chance exception of type 'System.Windows.Forms.AxHost.InvalidActiveXStateException' occurred in AxInterop.XtremeCalendarControl.dll



Posted By: jmargel
Date Posted: 19 February 2010 at 11:41am
Actually if you just go into form design mode and then try to run it, it gives you this error.  You don't need to edit any other controls for this error to come up.


Posted By: jmargel
Date Posted: 22 February 2010 at 11:51am
I found the issue.  I had to move the intializecomponent and control to the form_shown event.  Otherwise it was firing before the activex control was ready.



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net