Print Page | Close Window

CalendarControl Sample / .NET / Ofice 2007 Theme

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=6193
Printed Date: 27 September 2024 at 7:02am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: CalendarControl Sample / .NET / Ofice 2007 Theme
Posted By: apuhjee
Subject: CalendarControl Sample / .NET / Ofice 2007 Theme
Date Posted: 23 January 2007 at 9:47am
Hope I'm simply missing something, but is Office 2007 required to be installed on a machine before the Office 2007 Calendar Theme functions as expected?

Both .NET sample apps(C# or VB.NET) for the Calendar control are failing on the SetTheme() method with an exception that states "Value does not fall within the expected range."

Regards ~ jp

-------------
I like mathematics because it is not human and has nothing particular
to do with this planet or with the whole accidental universe — because,
like Spinoza's God, it won't love us in return.



Replies:
Posted By: apuhjee
Date Posted: 24 January 2007 at 9:59am
Codejock -
Should this be submitted as a bug?

Thanks ~ jp


Posted By: sserge
Date Posted: 24 January 2007 at 3:40pm
Hi,

Certainly it doesn't require Office 2007 to be installed.

Do you have a few different versions of the control installed simultanuously? This might be a sourece of the problem...

Also, which version of Visual Studio do you use? We've found a small issue with samples usage in VS 2002 -- this could also be a cause.

--
WBR,
Serge


Posted By: apuhjee
Date Posted: 24 January 2007 at 4:30pm
Serge -
I have a product in production and deployed that uses 10.3 - so yes, I have two different versions of the controls on my machine. Should it be possible to function correctly in this situation? What if a customer has this 10.3 product installed, then installs a new product using 10.4.1... will they encounter the same error?

Since I made my full evangelical swing over to C# and the .NET platform, one of the biggest benefits has been less versioning problems. I really look forward to the day that Codejock releases a 100% .NET product.

Cheers ~ jp



Posted By: sserge
Date Posted: 25 January 2007 at 6:08pm
Hi,
 
Well, simply having 2 versions on the same PC shouldn't cause any problem. There should be always something that uses them.
 
Firstly, do our sample applications have the same problem on these PC's ?
 
Second, could you please show us a piece of code where do you call SetTheme? Also, can you check the value which is passed to SetTheme? Is it a normal object, or NULL value?
 
And lastly, you have to check references to controls which project do use.
 
--
WBR,
Serge


Posted By: apuhjee
Date Posted: 26 January 2007 at 9:57am
Thanks for the reply Serge.

Originally posted by sserge sserge wrote:

Firstly, do our sample applications have the same problem on these PC's ?
Not sure. I'll look into it.

Originally posted by sserge sserge wrote:

Second, could you please show us a piece of code where do you call SetTheme? Also, can you check the value which is passed to SetTheme? Is it a normal object, or NULL value?
The problem is occurring in the C# CalendarControl sample that ships with 10.4.1 (with no changes):


               CalendarThemeOffice2007 pTheme2007;
               pTheme2007 = (CalendarThemeOffice2007)wndCalendarControl.Theme;
               if (pTheme2007 == null)
               {
                    pTheme2007 = new CalendarThemeOffice2007();
                    wndCalendarControl.SetTheme(pTheme2007);
                    mnuThemeOffice2007.Checked = true;
               }

pTheme2007 is indeed a non-null COM object.

I'll let you know what comes of my tests on machines other than this one.

Cheers ~ jp


Posted By: apuhjee
Date Posted: 26 January 2007 at 11:13am
Something I should add:

I've always been a bit in the dark with the COM registration procedure / registry settings. I've relied fairly heavily on InstallShield to properly install the Codejock controls on the user's machines. As far as I can tell, it's been working.

I'm now wondering if the registry settings that InstallShield makes are causing this versioning conflict... Could this be a possibility?

jp

-------------
I like mathematics because it is not human and has nothing particular
to do with this planet or with the whole accidental universe — because,
like Spinoza's God, it won't love us in return.


Posted By: sserge
Date Posted: 31 January 2007 at 5:29am
Yes, it could be possible. It actually depends on which version was installed the latest -- their COM controls will be used by default.

2 following procedures should fix the problem:
1) re-register the latest version of the Calendar control: "regsvr32 Calendar.ocx"
2) In Visual Studio remove a reference to the control and  insert it once more to the correct version.

--
WBR,
Serge



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