Checking if the control is registered |
Post Reply |
Author | |
farhanzia
Newbie Joined: 10 January 2004 Location: Pakistan Status: Offline Points: 8 |
Post Options
Thanks(0)
Posted: 10 January 2004 at 7:36am |
Hello, is there way I can check if the DockingPane control is registered on a machine. One way to check such things is to try instantiating the control. I tried the following ways but everytime I get an error that ActiveX component can't create object. Dim objDockingControl As XtremeDockingPane.Pane I tried this also, And also this But all these are throwing the same error that ActiveX component can't create object. Is there any way of checking if the control is already registered on a machine? Any help will be highly appreciated. |
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Dim objDockingControl As Object |
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
farhanzia
Newbie Joined: 10 January 2004 Location: Pakistan Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Thanks Oleg, it worked. However after getting that the control is not registered, I tried registering it through code the following way. Call Shell(regsvr32.exe "C:\MyFolder\DockingPane.ocx", vbHide) I get the message popped up that registration is successful (though I have used vbHide, but I am still getting the message popped up) But next when I try to create an object just as I did earlier (the way you have suggested), I got the error that ActiveX component can't create object. Please let me know how can I register the docking control through code. This will help much. And also any idea how can I hide that registration message that DllReisterServer successded. I tried using vbHide in the shell command but it didn't worked. Thanks so much for your help.
|
|
robs
Groupie Joined: 09 November 2003 Status: Offline Points: 84 |
Post Options
Thanks(0)
|
farhanzia, I usualy use something like this. Sorry for the long post. Private Declare Function LoadLibraryRegister Lib "KERNEL32" Alias "LoadLibraryA" _ Public Enum stRegisterStatus Public Function Register(ByVal p_sFileName As String) As stRegisterStatus 'Variant |
|
robs
Groupie Joined: 09 November 2003 Status: Offline Points: 84 |
Post Options
Thanks(0)
|
There's an even cleaner one listed on the Extreme Visual Basic Forum at http://visualbasicforum.com/t124982.html
Edited by robs |
|
farhanzia
Newbie Joined: 10 January 2004 Location: Pakistan Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Thanks guys. Both these solutions are working but we are at the same problem. The DockingPane.ocx file is getting registered successfully but after that when I am trying creating an instance of the control through code, I am getting the same error that ActiveX component can't create object. This is how I am trying to create the instance.
Dim objDockingControl As Object Set objDockingControl = CreateObject("DOCKINGPANE.DockingPaneCtrl.1") This code only works if I have installed the complete software. Otherwise just registering the "DockingPane.ocx" file is not working. I am getting the 'ActiveX component can't create object' error on the CreateObject line. Any help in this regards? By registering the "DockingPane.ocx" file, shall I be able to instantiate the "DOCKINGPANE.DockingPaneCtrl.1" class? Thanks, Farhan |
|
farhanzia
Newbie Joined: 10 January 2004 Location: Pakistan Status: Offline Points: 8 |
Post Options
Thanks(0)
|
Ok guys, I found a solution to it finally. After registering the ocx file, I was failing to instantiate the class "DOCKINGPANE.DockingPaneCtrl.1" because of the license issue. The license file "DockingPane.lic" has to be at the same path where the ocx is residing while registering. Once you will register in this scenario, you will be able to instantiate the class successfully. That means we need both these 2 files to deploy a software using DockingPane. i.e. 1. DockingPane.ocx |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |