how to properly reparent mdi child from vb6 to vb.net

S

sbs

Hello,

I have a funny question. We are in the process of moving a software of
ours from vb6 to vb.net. In order to get smooth transition we plan to
use the former app inside the newer as an activeX server, so that all
forms can be ported to vb.net one after another.

However, The problem is that both the original and the newer app are MDI
applications.

I have managed to get the old app to run as an activeX that is
instanciated in the newer app.
I can reparent the mdichlid windows from the older app to the newer app,
however I cannnot set the proper style so that it will behave as a
proper child window of the newer frame windows. As a consequence the new
MDI children cannot overlapp the older ones, and the maximizing of the
older forms in the newer app is not properly handled by windows.
I have tried using the spyXX to grab the ex_style of a forms10 mdi
child, but eventually ended with a right-to-left misbehaving child
(ExStyle += 50).

Thank you for your help

Stéphane
 
S

sbs

Hi All,

For those that may be interested by the matter, the solution is as follows:
- Change all mdi childs to vb6 windows to borderless
- Reparent them to a docked-fill panel ina standard .Net MDI child form
- Maximize the vb6 window so it will fill the panel

This seems to take care of all the refresh problems I have seen and
works around the problems linked to the window not "thinking" it is a
mdichil of the .Net frame window.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top