Print Page | Close Window

Name Class of DockinkPane

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Controls
Forum Description: Topics Related to Codejock Controls
URL: http://forum.codejock.com/forum_posts.asp?TID=10990
Printed Date: 21 November 2024 at 7:08pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Name Class of DockinkPane
Posted By: Lukas
Subject: Name Class of DockinkPane
Date Posted: 11 June 2008 at 6:28am
HI,
 
i have a big problem...
 
I use VB6 and use a DataActiveReports to make reports
a class of DataActiveReport is named PANE
 
I add a DockingPaneManager control and
when add the statement
 
DIM MENU_PANEL AS PANE
 
this "PANE" is not a class or object of CodeJock
but is DataActiveReport's Class or Object
 
Somebody can help me...?
 
Thanks in advance
 
 



Replies:
Posted By: ijwelch
Date Posted: 11 June 2008 at 6:53am
Dim MENU_PANEL As XtremeDockingPane.Pane


Posted By: Lukas
Date Posted: 11 June 2008 at 7:15am
Many many thanks...
 
and sorry for the stupid question....
 
Best regards...


Posted By: Aaron
Date Posted: 11 June 2008 at 8:02am
Originally posted by Lukas Lukas wrote:

Many many thanks...
 
and sorry for the stupid question....
 
Best regards...
 
Hi,
 
I think its not that stupid question. I didn't think of this before that it could happen as you have now. I didn't get any problems on my own PC (yet) but suppose there is other software installed on a client PC, what will happen???
 
But it's strange that it happened, if I look at the MS controls in mscomctl and comctl libraries they have the same classes too (CJ XtremeControls has the same classes for the standard controls as well) and one of our support members said (see post http://forum.codejock.com/forum_posts.asp?TID=10931 - http://forum.codejock.com/forum_posts.asp?TID=10931 ) that VB won't get confused ?!?!
 
 
Now my question is: Is it wise to add Xtreme.... before every class/control ?
 
Thanks in advance and thank you Luca for bringing this up


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: jpbro
Date Posted: 11 June 2008 at 12:34pm
Hi Aaron,

I usually often add the fully qualified class/object name just out of habit, but you don't need to do this unless you have referenced two ocxs/dlls that share class names. If a user has DLLs/OCXs installed that share class names internally, it won't cause a conflict unless your project specifically references those controls/libraries.

As for if it is wise...Well it doesn't hurt (AFAIK, maybe it takes longer to compile??? :)), and it could improve future maintainability (for example, suppose you add a conflictingly named control in the future, now you don't have to add the qualifiers to all of your references).




-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: Aaron
Date Posted: 11 June 2008 at 4:13pm
Originally posted by jpbro jpbro wrote:

Hi Aaron,

I usually often add the fully qualified class/object name just out of habit, but you don't need to do this unless you have referenced two ocxs/dlls that share class names. If a user has DLLs/OCXs installed that share class names internally, it won't cause a conflict unless your project specifically references those controls/libraries.

As for if it is wise...Well it doesn't hurt (AFAIK, maybe it takes longer to compile??? :)), and it could improve future maintainability (for example, suppose you add a conflictingly named control in the future, now you don't have to add the qualifiers to all of your references).


 
Hi,
 
Thanks for your reply. I never did add the class/ object name before, just because Lucas did get a problem with DockingPanes, I wondered if it was better to do so. Maybe our support team will shed a on this
 
 
 
 


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: ijwelch
Date Posted: 11 June 2008 at 8:58pm
I think it's good practice for the reason given by jbpro (future maintainability) and readability.

I find it easier to add the library name anyway because it makes the intellisense list narrower.


Posted By: Aaron
Date Posted: 12 June 2008 at 2:32pm
Originally posted by ijwelch ijwelch wrote:

I think it's good practice for the reason given by jbpro (future maintainability) and readability.

I find it easier to add the library name anyway because it makes the intellisense list narrower.
 
Hi,
 
Ok, you guys convinced me, I will add the library name
 
Thanks


-------------
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2
Language: Visual Basic 6.0

Zero replies is not an option....


Posted By: Baldur
Date Posted: 07 July 2008 at 5:40pm
This depends by design.
The classname is actually used only for us programmers.
 
Internally the ide looks to the added components (ObjectBrowser) and use always the fully qualified classname.
 
At runtime, the classname does nothing !
The classname would be replaced by its CLSID (Class-Id).
This is the known Universal-Class-Id defined by COM.
 
So now in COM to create an object you need the CLSID not the Name.
But you have a helperfunction, to find the CLSID from the ClassName and for that, you need ervery time the quallified classname.
 
Have a look with RegEdit:
 
Under HKEY_CLASSES_ROOT you will find each qualified classname for this pc.
Each Class has a subkey with CLSID.
 
Under HKEY_LOCAL_MACHINE\Software\Classes\CLSID you will find for each CLSID the corresponding DLL/EXE in the subkey InprocServer.
 
This is the reason why you need adminrights to install COM-Objects.
 
In your VB-Projectfile you will find the CLSID, Version and expected DLL/EXE.
VB-Runtime check if all this property matches.
 
Normally COM checks only the CLSID and at runtime the available Methods and properties (see VB6 Object-Browser) also known as reflections, but not the same as .NET or Java.



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