OberonPlace.com Forums  

Go Back   OberonPlace.com Forums > Developer Forums > VBA > CorelDRAW/Corel DESIGNER VBA

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 18-03-2013, 16:36
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Angry VSTA problem...

I try to make a VSTA addin and I face some problems…
I use Corel X5 (VSTA 2.0, Microsoft .NET Framework V 3.5 SP1) in Windows 7 (64-bit SP1).
I did not find any documentation and based on what I could understand from other threads on this forum I tried the next:
I opened a new project in VSTA editor I created a window form and a class with a function to show the form.
I create a button on the StartUp event and a new module in the GlobalMacros with a sub procedure allocated to created button.
My intention was to call the function in the addin class (to show the form) adding a reference to addin. Locating the addin in Corel StartUp path I hopped to automatically load the addin and be able to show the form pressing the created button…
But even if I put it in C:\Users\Me\Documents\Corel\VSTA\CorelDRAW\Addins the addin is not loaded by Corel.
I tried to register it and received the message "The module was loaded but the Entry-point DllREgisterServer was not found" And something about checking if it is a valid DLL or OCX. So, I used 'Dependency Walker' and I found 'Modules with different CPU'. I mean all dll with CPU x64 except the addin itself with CPU x86. And a warning: 'At least one module has an unresolved import due to a missing export function in a delay-load dependent module'.
The project is compiled/built and works well in VSTA editor in debug mode but it is not loaded/seen like a proper addin...
The strange thing is when I have the dll in Corel StartUp path it looks that the function to show the form is triggered meaning that after stopping the debugger the form is shown (using a previous version it executed that old code...)
I attach the code (project) but I do not know how relevant it is...
Does anybody else have a WORKING dll made in VSTA? I mean to be loaded like addin in Corel... Even if very simple...

Can anybody suggest something to be tried?
Thanks in advance!
Attached Files
File Type: zip TestAddin1.zip (164.9 KB, 231 views)
Reply With Quote
  #2  
Old 23-03-2013, 14:03
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Default

Maybe such an addin made in VS2010... Please!
Reply With Quote
  #3  
Old 24-03-2013, 11:54
SteveDude SteveDude is offline
Senior Member
 
Join Date: Dec 2005
Location: Salina, Kansas USA
Posts: 149
Default ...

Wish I could help you with this, but am unfamiliar with doing it via VSTA. At least at one time add-ins were based on COM and I think they still are so the assembly would have to be registered for and visible to COM interop and may need to be targeted for proper version platform. It is possible to make .NET assemblies interact with COM - that's what it is doing with all automation with Corel, just can't tell you how to make it work in the way you want. Sure someone else on here knows more about VSTA than I...I know nothing about it.
Reply With Quote
  #4  
Old 25-03-2013, 15:47
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Default

Firstly thanks for your interest!
I would much appreciate any sample in VB.NET also but it looks that nobody knowing it could see this thread...
Reply With Quote
  #5  
Old 27-03-2013, 14:31
AVP AVP is offline
Junior Member
 
Join Date: May 2009
Posts: 13
Default Vs 2010

I write in VS2010 in VB.NET as . EXE
For which version of Corel write an example? Corel X5 or X6?
Reply With Quote
  #6  
Old 29-03-2013, 15:25
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Default

X5
Thanks!
Reply With Quote
  #7  
Old 30-03-2013, 00:59
AVP AVP is offline
Junior Member
 
Join Date: May 2009
Posts: 13
Default

For CorelX5 with Service Pack 3/ Hot Fix 4.
Read file ReadMe.txt in 'Realization' folder
Attached Files
File Type: zip ExampleDotNet.zip (110.2 KB, 271 views)
Reply With Quote
  #8  
Old 30-03-2013, 07:41
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Default

Thanks!
I will immediately test it...
Reply With Quote
  #9  
Old 30-03-2013, 07:53
FaneDuru FaneDuru is offline
Member
 
Join Date: May 2012
Posts: 35
Default

It looks that gsm file was prepared for X6... But it was easy to adapt for the path of GMS folder of X5.
It works! Thanks again!

I do not want to bother too much but shell I dare to ask for an idea to prepare a COM addin (dll) to be automatically launched at CorelDRAW start?
Thanks in advance!
Reply With Quote
Reply


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
VSTA Anyone? thayne Macros/Add-ons 13 16-03-2013 08:18
Should I learn VBA or VSTA? fungel Macros/Add-ons 3 14-07-2010 05:59
Has anybody used VSTA of X5 aakkaarr CorelDRAW/Corel DESIGNER VBA 0 31-05-2010 09:54
Migrate from VBA to VSTA thayne CorelDRAW/Corel DESIGNER VBA 4 11-09-2009 14:58
Vsta DebG CorelDRAW/Corel DESIGNER VBA 2 18-02-2009 15:59


All times are GMT -5. The time now is 01:21.


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