OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Corel User Forums > CorelDRAW > Macros/Add-ons

Thread Tools Search this Thread Display Modes
Old 10-02-2013, 09:47
coreldrawer coreldrawer is offline
Junior Member
Join Date: Nov 2008
Posts: 7
Default Problem with reference to create Docker.

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.
Reply With Quote
Old 10-02-2013, 21:13
shelbym's Avatar
shelbym shelbym is offline
Senior Member
Join Date: Nov 2002
Location: Cheyenne, WY
Posts: 1,791
Blog Entries: 15
Send a message via ICQ to shelbym Send a message via AIM to shelbym Send a message via MSN to shelbym Send a message via Yahoo to shelbym
Default WPF Docker

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.

Reply With Quote
Old 11-02-2013, 00:10
coreldrawer coreldrawer is offline
Junior Member
Join Date: Nov 2008
Posts: 7

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

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()
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
Reply With Quote
Old 13-02-2013, 22:50
coreldrawer coreldrawer is offline
Junior Member
Join Date: Nov 2008
Posts: 7

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.
Reply With Quote

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
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

All times are GMT -5. The time now is 14:57.

Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2023, Jelsoft Enterprises Ltd.
Copyright © 2011, Oberonplace.com