![]() |
#1
|
|||
|
|||
![]()
Hi all.
I create some Dockers for Corel X6. But now, I have a problem: I create a own control with using Visual Studio WPF UserControl Library template, and I use a reference of another C# project. As a result, I have a MyControl.dll and third-party dlls. When I put only MyControl.dll in folder Corel\VSTA\CorelDRAW\Addins and run Corel - I have empty Docker. When I put MyControl.dll and third-party dlls in folder Corel\VSTA\CorelDRAW\Addins and run Corel - Corel is crashed. Can Corel create docker with reference libraries? How I can debug this process? P.S: Sorry for my English, I am from Russia. |
#2
|
||||
|
||||
![]()
All file .DLL files need to be in the same folder. For the new WPF dockers we have been installing them to:
C:\Program Files\Corel\CorelDRAW Graphics Suite X6\Programs64\Addons If you are crashing, wrap everything in a Try Catch, and have it show the message to help you debug. -Shelby |
#3
|
|||
|
|||
![]()
Thanks. I debug code, and I think that problem in Corel.
Docker started working after I just add string "MessageBox.Show("");" in constructor of one component. But Corel behaves strangely: If I delete string "MessageBox.Show("");" from constructor of one component - Corel is crashed. if I leave this line - Corel create two identical dockers. My code in .gms file to add Docker: Sub AddTackleTwillDocker() Dim ControlsCount As Integer ControlsCount = Application.FrameWork.CommandBars("Dockers").Controls.count Dim ControllCreated As Boolean ControllCreated = False Dim i As Integer i = 1 Do If (Application.FrameWork.CommandBars("Dockers").Controls.Item(i).ID = "6139b731-672f-4131-88e4-3a30833b349d") Then ControllCreated = True End If i = i + 1 Loop Until i > ControlsCount If (ControllCreated = False) Then Dim MyString As String MyString = Environ("USERPROFILE") + "\Documents\Corel\VSTA\CorelDRAW\Addins\MyDocker" Call FrameWork.AddDocker("6139b731-672f-4131-88e4-3a30833b349d", "MyDocker.Docker", MyString) Call FrameWork.CommandBars("Dockers").Controls.AddToggleButton("6139b731-672f-4131-88e4-3a30833b349d", 0, False) End If Application.FrameWork.ShowDocker ("6139b731-672f-4131-88e4-3a30833b349d") End Sub Private Sub GlobalMacroStorage_Start() AddTackleTwillDocker End Sub When Corel is run, I check the existence of a Docker. If docker have already created I show it. Sometimes all is fine, but some times when I drag Docher - Corel is crashed or make error: Run-time error '-2147467259 (80004005)' Method 'ShowDocker' of object 'FrameWork' failed. When Corel crashedIt looks like this ![]() |
#4
|
|||
|
|||
![]()
I solved my problem. This was a problem with the asynchronous operation. And when I added a MessageBox, then set a pause, and the code is starts working.
|
![]() |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Object reference | xombie | CorelDRAW/Corel DESIGNER VBA | 2 | 25-05-2011 13:20 |
Reference to Corel X3 | Aleksandr | OberonPlace Development Portal | 0 | 21-01-2011 15:16 |
CDRPRNINTL.dll reference | SanchoFilin | CorelDRAW/Corel DESIGNER VBA | 2 | 06-02-2009 07:33 |
Print problem of create curve | petu | CorelDRAW/Corel DESIGNER VBA | 5 | 25-05-2005 21:02 |
create docker window | vharun | CorelDRAW/Corel DESIGNER VBA | 2 | 26-05-2004 07:56 |