How to convert an MDI app to a paned app like the Delphi IDE

I have an old app that uses the MDI style. And I would like to modernise 
it to use multiple docked/paned windows (e.g something like MS Outlook 
or the Delphi IDE say).

Does anyone have any tips about what needs to be done to migrate my 
current MDI Forms to the new UI concept. (The app is several hundred 
thousand lines of code, so a rewrite is out of the question...)

AndrewFG
0
Andrew
11/12/2009 7:15:48 AM
embarcadero.delphi.general 4258 articles. 0 followers. Follow

5 Replies
1463 Views

Similar Articles

[PageSpeed] 15

Andrew Fiddian-Green wrote:

> I have an old app that uses the MDI style. And I would like to
> modernise it to use multiple docked/paned windows (e.g something like
> MS Outlook or the Delphi IDE say).
> 
> Does anyone have any tips about what needs to be done to migrate my 
> current MDI Forms to the new UI concept. (The app is several hundred 
> thousand lines of code, so a rewrite is out of the question...)

Change the Formstyle of the main form and all child forms to fsNormal.
As a first step that will give you a non-MDI application were each
secondary form is independent of the main form.

Search your code for references to MDI-related things, like references
to the MDIChildren or ActiveMDIChild property.

Overhaul your menu code. With the new setup the automatic menu merging
done for TMainMenu instances on the child forms will no longer work.
Instead each form will have its own menu bar. If you later decide to
dock one of the forms it will loose the menu bar. If you want to retain
it you have to create a menu bar using a TToolbar and assign nil to the
forms MainMenu property to get rid of the standard menu bar.

You can "dock" any of the secondary forms to a panel on the main form,
for example, in code by setting

 - its Parent property to the panel
 - its BorderStyle to bsNone
 - its Align to alClient

That turns the now embedded form into a control, which has some
consequences on how the form's events work. The OnKey events of the
form will no longer fire, for example. Instead the main forms OnKey
events will fire when focus is on a control of the embedded form.
OnActivate/OnDeactivate do not fire anymore. If you want to get aware
when a control on the embedded form is focused, use the forms OnEnter
event instead. OnCloseQuery and OnClose also do not fire anymore when
the embedded form is destroyed because the host form is closed and
destroyed.

If you want to allow your user to dock and undock windows like you can
in the IDE you need to investigate the VCL's drag&dock support. I have
never looked at that and cannot give you advice in this area, though.

-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
11/12/2009 6:37:33 PM
Dear Peter,

Brilliant! Very succint. I will give it all a try. Thanks.

AndrewFG
0
Andrew
11/12/2009 11:16:29 PM
Peter


>OnCloseQuery and OnClose also do not fire anymore when
>the embedded form is destroyed because the host form is closed and
>destroyed.

In D2006 I have forms embedded on a page of a TAdvOfficePager and their OnClose/OnCloseQuery events seem to be working fine, and if I .Free one of them the host form doesn't get closed.

The only events I've NOTICED that are giving me trouble are the OnActiveate/Deactivate ones.

Roy Lambert
0
Roy
11/13/2009 7:36:48 AM
Roy Lambert wrote:

> Peter
> 
> 
> > OnCloseQuery and OnClose also do not fire anymore when
> > the embedded form is destroyed because the host form is closed and
> > destroyed.
> 
> In D2006 I have forms embedded on a page of a TAdvOfficePager and
> their OnClose/OnCloseQuery events seem to be working fine, and if I
> .Free one of them the host form doesn't get closed.

They work if you close the form in code by calling its Close method.
But that is not how embedded forms are typically used (at least in my
apps <g>).



-- 
Peter Below (TeamB)  
Don't be a vampire (http://slash7.com/pages/vampires), 
use the newsgroup archives :
http://codenewsfast.com
http://groups.google.com
0
Peter
11/13/2009 5:53:36 PM
Peter


>They work if you close the form in code by calling its Close method.

Good point

>But that is not how embedded forms are typically used (at least in my
>apps <g>).

My sympathy to your apps.

Roy Lambert
0
Roy
11/14/2009 9:53:55 AM
Reply:

Similar Artilces:

How do You Write a Web App that Looks like Your Delphi App
Hi I have written an application that I would like to port into a web application. What is the best language to choose. For example php, Ruby on Rails or some other language.. Thank you. > {quote:title=Peter Skinner wrote:}{quote} > Hi > > I have written an application that I would like to port into a web application. What is the best language to choose. > > For example php, Ruby on Rails or some other language.. > > Thank you. Here's something you can try with very little investment of time, which is to auto-convert your existing app's m...

Convert Delphi 5 ADO App to Delphi 2007 ADO.NET
I have an appliction tha that is writen in Delphi 5 with ADOConnetion, ADOTable, and ADOQuery components. I need to upgrade to Delphi 2007 and use ADO.NET. I have the program building in with Delphi 2007. Is there anything I need to do to convert the ADO to ADO.NET? > I need to upgrade to Delphi 2007 and use ADO.NET. Why ? -- With best regards, Dmitry Arefiev AnyDAC (www.anydac.com) - Oracle, MS SQL Server, IBM DB2, MySQL, Firebird, Interbase, PostgreSQL, Sybase ASA, SQLite, MS Access, DBX, ODBC, InMem - universal high-speed native data access engine Reasons for ...

Delphi app in Apple App Store for iOS
Have you guys with iPhones and iPads seen that there is a Delphi produced app, running Interbase To Go, approved for download on the Apple App Store? I can't find a link on the web, but search "Embarcadero" on the app store and it shows up. (My daughter showed me. ;-) ) -- Nick > I can't find a link on the web, but search "Embarcadero" on the app > store and it shows up. (My daughter showed me. ;-) ) There are 6 apps that shows up... which one is it? - Palo Alto - Embarcadero (Fom Scott James, mapping software or something..) - Heart of...

Dragging and dropping a .WAV from Delphi App to other apps
Is there an easy way to drag a .WAV file from a Delphi 2006 App to another app. It's not from a listbox or anything like that. It's from a custom window. My code would need to be responsible for generating a .WAV file based on where the person initially clicked on a window. Is the only way to drop a file from a Delphi 2006 to use complicated COM routines? If so, then would the other app that receives the file need complicated com routines too, or would it work with any app that could accept a the same dropped file type from Explorer? Thanks. "Jeff Ya...

Are there any Delphi apps on the iTunes or Mac App Store?
So XE2 has been out for a while now. Surely there must be some apps created with it on either app store (or otherwise). Can someone point me out to those? > {quote:title=Martin Kammann wrote:}{quote} > So XE2 has been out for a while now. Surely there must be some apps created > with it on either app store (or otherwise). > Can someone point me out to those? Anders has one: http://itunes.apple.com/us/app/anders-analog-clock/id475178939?mt=8 And I believe Bob Swart does too. Note that you're not required to use the Mac App Store to deploy your apps to OS X. ...

Delphi 7 app to web app conversion [Edit]
My company has an old Windows engineering application that we would like to convert to a web application so that we can offer it as a software as a service. The application is written primarily in Delphi 7 with the heavy number crunching done in Fortran (I did say it was old!). We would like to reuse as much of the existing Delphi code as possible and only modify the Fortran enough so that it will run in the background on the web server. We have never developed a web application so we're looking for guidance on the best way to make this conversion. Our questions at this point: ...

How to Change Tablet App to Phone app in Delphi XE8? [Edit]
Hi, i've created an app more specifically for tablets. So if the screen is smaller than 7 inch not everything fits. I do work with layouts and Align properties so everything gets scaled accordingly to the screen size. I know a few options to make the app useable for phones ass well. But not sure what the best way is. Option1: Create multiple Views for each size screen. Option2: Use ScaledLayout to make everything smaller or bigger. Option3: Use scrollBox. Option4: Edit component sizes in FormCreate after checking screen size. Option5: Devide in more Forms. *So what&...

Delphi app?
Have a look. http://profantasy.com/products/ft_creating.asp What do you think? Delphi app? -- Dennis Landi Allied Data, Inc. http://www.allied-data.com Electron Server http://www.electronserver.com Dennis Landi wrote: > What do you think? Delphi app? Cool! I got a C code from a Danish guy 15 years ago for the calculations - and created an app that created GIF images of fractal planetary maps in Linux. I mostly used it to create random maps to my desktop background(!). Finally someone has wrote a product of the subject (with some extensions:)... The opt...

problem delphi 2010 apps with a delphi 5 pro Pchar
Hallo I build on till now alle tools and programas with delphi 5 pro now i have delphi 2010 want don't want rewite alle my DLL Tools Like The tool i made for making PDF In case of This DLL i can't becose the vcl i use in delphi 5 will not work in delphi 2010 *This call in apps* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall external 'GUPPDF2.dll'; {code} *In delphi 5 DLL* {code} Function GenratePDF(Settings:Pchar):Boolean; stdcall; {code} if call the function i get a "Access violation" i think that the settings parameter empty is...

XG Mobile App (Delphi XE2/Firemonkey ) now in the app store
My app is finally in the App Store. My thanks go to forum members for the help provided in all the post here. Xavier Dufaure de Citres ----- _*XG Mobile for iPhone, iPad and iPod Touch now in the App Store*_ XG Mobile is the portable version of the acclaimed program "eXtreme Gammon" for PC. You can now have the power and accuracy of eXtreme Gammon in the palm of your hands. In its few years of existence (since 2009) eXtreme gammon has been recognized as the best backgammon program available. This has been confirmed by top players in the world and by independen...

How to build enterprise-grade Delphi app
Hi It would be nice to build enterprise-grade appl with Delphi, but are the options or third party software (like in J2EE) to do this? e.g. 1) there is J2EE middleware for hosting components - developer is not required to handle all the issues that are connected with session handling and different contexts in which the components can be stored (like application, session, request context, etc.). I understand that some of this can be done in DataSnap or in Web Services (can be even PHP, Java or .NET) and Delphi client - but in both cases there are some drawbacks: - for DataSnap - much shou...

calling a c++ dll from a delphi vcl app crashes the app upon exit [Edit]
I am using RAD Studio 2010 and I downloaded the latest updates. Since I can't see how I can attach a file to the message, I included in this message the source code for each file: To reproduce this problem follow these steps: Create a project group with two projects, one c++ dll project and one a Delphi VCL forms project. Save all the files in the same folder. 1. Use the wizard to create the c++ dll project, select c++ & Use VCL checkboxes. Make sure Project Options->C++ Linker->Dynamic RTL is set to true. I also added memmgr.lib and sharemem.obj to the project but I bel...

Delphi OSX Bundler (Create .app via IDE)
http://enesce.com/dl/DelphiOSX_Bundler.zip Description: This tool will create a simple ZIP bundle for your Delphi OSX application. In order for you to Deploy your application to the public, you need to have your project in an OSX "Application Bundle". The RAD Studio IDE does not do this for you on Windows, so that is where this tool comes it. You simply Compile your project in "Release" configuration, then use this tool to create an OSX Bundle, the created ZIP will extract your application bundle with the required libraries for OSX , without the need...

Delphi 2009 app no longer runs from IDE with debugging on
I've got an app that has been running fine for years that all of a sudden will not launch from the IDE anymore unless I select "Run without debugging". I have not made any code changes since the last time it was working correctly. When I select Run, the IDE minimizes normally. My EXE shows up in the Windows Task Manager but there is nothing visible on the screen. Then after about 10 or 15 seconds, the IDE pops back up as if the program was terminated normally. If I run without debugging then all is fine. What should I look for? If I create a new app with just a...

Web resources about - How to convert an MDI app to a paned app like the Delphi IDE - embarcadero.delphi.general

File:Convert to SVG and move to Commons.svg - Wikipedia, the free encyclopedia
As a courtesy (but not a requirement), please e-mail me or leave a note on my talk page if you use this image outside of Wikipedia. Thanks! As ...

Facebook Co-Founder Dustin Moskovitz Sells 450K Shares, Converts 7M More
The great Facebook stock sale frenzy continues on with a report that Co-Founder Dustin Moskovitz unloaded 450,000 shares in the social network ...

Facebook Announces “App2User” Liquidity Program for Merchants to Convert Rewards Points into Credits
... for Credits, just announced a new Credits program called “App2User,” designed to enable merchants and loyalty program operators to convert their ...

How to Convert Leads Into Buying Customers - The 9 Step Sales Process EVERYONE Should Use
... School of Business in Toronto on the topics of Sales and Entrepreneurship. I shared with them the sales process that I find How to Convert Leads ...

Bitcoin : Should I convert my savings to Bitcoin?
Answer (1 of 7): You should think of this question as "Should I invest all my savings in Bitcoin?", and not "Should I have my savings denominated ...

Convertizo 2 - Convert Units and Currency in Style on the App Store on iTunes
Get Convertizo 2 - Convert Units and Currency in Style on the App Store. See screenshots and ratings, and read customer reviews.

Catholics should not convert Jews, says Vatican, in push against anti-Semitism
... 50 years since the Vatican's repudiation of the concept of Jewish guilt for Jesus' death.  Vatican City: Catholics should not try to convert ...

Opinion: These 5 things made me a happy iPad Pro convert
... like I needed a bigger device. But after three weeks with my iPad Pro, several things have changed my mind, and I’m officially a happy convert ...

Today’s apps gone free: BlockBear, Stock Grader, PDF Smart Convert and more
Block ads and other annoying content, take the emotion out of investing, and convert almost anything into a PDF with todays collection of apps ...

How to convert your old VHS tapes to DVD with this software
Remember those old VHS tapes you have sitting in the corner? Convert them into DVDs with this affordable software so you can easily watch them ...

Resources last updated: 12/25/2015 5:37:58 PM