Attach Visual Studio 2008 window in a Delphi window

Hello experts,

I have built a project regarding the greek election system in Delphi2009 (win32 development).
I received some components for our new tv graphics system written for .NET.

I must use Visual Studio 2008 to build the part that gives the video output.

------------

What I need to have is the following

Have a primary window in Delphi and have a space where I will attach the window of the .NET program written in C# and somehow have these two programms exchange data so my delphi dialog feeds with results data the .NET video program.

Therefore the VS2008 window must be PINNED at a fixed area and move together with the "master window" in delphi, as I show in my "wanna be" screenshot.

On top of that a hint of how these two windows could exchange data between them (like talk to each other - have the delphi window feed the election information to the video window and display the different stats depending on the different result).

Any suggestion will be valuable

--------------

PS. I give 290 Points because thats all I'm left with, I would gladly give 10 times more than this

vs2008-delphi.jpg
LVL 6
Ioannis AnifantakisProgramming InstructorAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ioannis AnifantakisProgramming InstructorAuthor Commented:
To make it more simple, I want to define a "window container" in delphi where I will place the visual studio program window
0
Emmanuel PASQUIERFreelance Project ManagerCommented:
Create an activeX component with delphi (or an activeForm), then add some properties and methods to it using the type library wizard, and from visual studio you put this on your main form as you would with any component or frame, and access those properties/methods with C# for the communication part
0
Emmanuel PASQUIERFreelance Project ManagerCommented:
Oups, no that's the opposite you want. Whatever, that's the same technique, you have to create an activeX container from visual studio and import it in delphi to use it.
0
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

Ioannis AnifantakisProgramming InstructorAuthor Commented:
Hmmm.... can you give me a hand on this?

I opened VisualStudio2008, made a new project of type "Windows Forms Control Library".
That way I created a dll that contains a form.

Happy with this, I opened Delphi and went to "Component -> Import ActiveX Control".

Now when I try to attach the dll to delphi, I get the error "The OLE control does not support self-registration."
0
Emmanuel PASQUIERFreelance Project ManagerCommented:
you have to manually register it
open a command line and type
regsvr32 C:\MyDllPath\MayDllName

then retry the import activeX (it now should be on the list of available interfaces)
0
Ioannis AnifantakisProgramming InstructorAuthor Commented:
regsvr32 does not apply to .NET
From some reading I've done RegAsm.exe replaces regsvr32.exe for .NET

So I found a sample project from the following address
http://www.codeguru.com/csharp/.net/net_general/comcom/article.php/c16257

You can follow the steps or simply download the code and the dll generated.  However, delphi cannot see it and continues to produce the error "The OLE control does not support self-registration."

Have you guys any idea about it?

Is it possible to produce ActiveX from CSharp and be able to register this as ActiveX to delphi?
Its driving me nuts!
0
Ioannis AnifantakisProgramming InstructorAuthor Commented:
For the very same dll if you try to regvr32 it, you get the error from regsvr32.exe:

CSharpWindowsActiveX.dll was loaded, but registration point DllRegisterServer was not found.

Awesome? lol
0
Emmanuel PASQUIERFreelance Project ManagerCommented:
>> CSharpWindowsActiveX.dll was loaded, but registration point DllRegisterServer was not found.

yep, that DllRegisterServer function is the entry point for registration of ActiveX dll. Which means that in all effects, what you have produced is NOT an activeX. I don't know what you should do on this part, probably check again if in VS you can't find a way to create an activeX. If you can't find it quickly, post a new question in C# forum "how to create ActiveX object with C#, that can be integrated in all dev plateform supporting it" , and once you have finally found a way to do that, report here and I will help you do the integration in Delphi
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Ioannis AnifantakisProgramming InstructorAuthor Commented:
epasquier:

Thank you for your fast reply.

I will look more into it and if within a couple of hours I haven't found anything I will give you the credits and open a new thread in C# section.

If you want to find my new post in that sections you can leave me your email my email address that I paste bellow so I can guide you to the next thread.

You can reach me at ioannisanif@gmail.com
0
Ioannis AnifantakisProgramming InstructorAuthor Commented:
However its worth to take a look into the adress I've pasted above and download the sample and see what happens yourself (inside the bin\release folder)
0
Emmanuel PASQUIERFreelance Project ManagerCommented:
I don't have VS... but simply post here your other thread URL once you have opened the question , I'll follow that if I can
0
Ioannis AnifantakisProgramming InstructorAuthor Commented:
You don't need visual studio.  You only need .NET framework which I assume you have.


If you download the "demo", appart of the source, it has the compiled dll and the regasm.exe to register it at the folder I specified above
0
Ioannis AnifantakisProgramming InstructorAuthor Commented:
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.