By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,558 Members | 1,399 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,558 IT Pros & Developers. It's quick & easy.

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

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
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.
sbs wrote:
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


Nov 21 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.