CSharp/C# >> hosting c# forms and app in a delphi 7 win32 host

by » Fri, 05 Sep 2008 09:40:52 GMT

Hi

i realise this is an esoteric subject, but im hoping someone can help
me

im working with a legacy application that was originaly developed in
delphi 7, and inaddition to this the application has a few newer
modules (winforms c# dll's) loaded and running under the delphi host,
and there is some object data retrieval by the c# stuff from the main
delphi app.

The owners now want to replace and upgrade more delphi parts by more
c#, but comunication, loading and performance of the dotnet stuff is
slow and kludgy.

a rewrite of the application in dotnet from scratch wont be considered



so im hoping someone out there may have done something similar in the
past an can point me to or provide samples of the most efficient and
best performing way to have c# dotnet stuff hosted in such a way. I
want to re-write the way it is loaded and hosted now to make the
whole thing faster

any advice or examples or ideas appreciated

Peted

Similar Threads

1. Web Hosting, Reseller Hosting, and Dedicated Hosting!!!!!! - CSharp/C#

2. Hosting WebBrowser ActiveX control in a C++ Win32 API app

3. MySql: Copying table from one host to same table on other host

4. Resizing dock host form doesn't resize docked form

Greetings,

I have implemented my own custom dock manager to satisfy specialized 
requirements for the desired docking behavior, and I have to say, it works 
rather well. I was able to replace the grabber bars with a Windows-style 
caption bar, as well as some other small details. There is one issue, 
however, that I have thus far been unable to solve.

I have a host form that contains four dock site panels, placed at the top, 
bottom, right and left edges of the form. Each panel is aligned according to 
its position (i.e. top panel is alTop, bottom panel is alBottom, etc.). 
After the dockable form is attached to a host panel site, I am able to size 
the docked form using a splitter, and this works fine. Moreover, if I 
attempt to resize the outer host form in THE SAME DIRECTION as the alignment 
of the dock site panel, everything is good. The problem arises when I size 
the outer host panel in an ORIENTATION DIFFERENT than the alignment of the 
dock site panel.

For example, say I dock the attachable form to the right-side panel; it's 
aligned alRight. I can then size the docked form horizontally using a 
splitter. I can also size the outer host form horizontally. When I attempt 
to size the outer host form VERTICALLY, then the right-docked form doesn't 
properly adjust itself to match the new vertical size of the outer host 
form. The docked form's client area doesn't stretch to match the larger 
client area of the outer host form, leaving an ugly gap.

Does anyone now of a way I can adjust my custom dock manager to adapt to 
changes in the outer host form's size? I've tried several different 
approaches, like overriding the ResetBounds() method, and even adding 
special code in the PaintDockFrame() method, which I'm already overriding. 
Nothing seems to work. Any help would be greatly appreciated to solve this 
annoying glitch.

Thanks,
-Michael