OberonPlace.com Forums  

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

Thread Tools Search this Thread Display Modes
Old 18-03-2013, 15:36
FaneDuru FaneDuru is offline
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, 347 views)
Reply With Quote
Old 23-03-2013, 13:03
FaneDuru FaneDuru is offline
Join Date: May 2012
Posts: 35

Maybe such an addin made in VS2010... Please!
Reply With Quote
Old 24-03-2013, 10: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
Old 25-03-2013, 14:47
FaneDuru FaneDuru is offline
Join Date: May 2012
Posts: 35

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
Old 27-03-2013, 13: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
Old 29-03-2013, 14:25
FaneDuru FaneDuru is offline
Join Date: May 2012
Posts: 35

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

All times are GMT -5. The time now is 06:12.

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