MDI Substitute-VBForums
Results 1 to 18 of 18

Thread: MDI Substitute

  1. #1

    Thread Starter
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,154

    Arrow MDI Substitute

    I'm starting in on re-writting our main desktop application from VB6 to .NET and want to use WPF. Now our legacy app is an MDI app and we need to maintain the flow/look as we have hundreds of agents that use it and re-training needs to be minimal to non-existant.

    Anyone have any good solutions to maintain an "MDI" appearance / functionality? Its a large application so like with VB6's limit of 255 controls on a form (it has the control array thing to bypass it) and resource intensiveness should take some consideration here too.

    Ive see using frames as one possible solution but I think it will be too heavy and would rather use separate "chjild" forms.

    Thanks
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,598

    Re: MDI Substitute

    Well first things first lets get you out of that winforms mind frame, we call them Windows in WPF, not Forms haha just kidding (although that is true obviously)

    What exactly are you wanting suggestions on then? How to actually implement an MDI like interface (as in the code for it) or just how to visually represent each MDI window etc?
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,154

    Re: MDI Substitute

    Old habbits die hard

    Well MDI like interface but I dont want a heavy "window" if its only "simulating" MDI. It needs to be easily maintainable from a design aspect as it will be in place for a minimum of 5 years.

    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  4. #4
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,598

    Re: MDI Substitute

    Oh right so you dont want want to use a Window for each MDI window/form in your app? Thats how you would use MDI in winforms isnt it, with a 'heavy' form for each MDI window instance.

    Anywho, you can make some rather nice looking MDI-a-likes with WPF because of all the visual tricks WPF can pull off, for example its easy to create a thumbnail of all currently open windows and stick these in a selectable list (think Alt-Tab in Vista).
    Here's a good example, although its kind of hard to see in this screenshot as its not on the window thats in focus: http://www.istartedsomething.com/wp-.../lawson_1l.jpg
    See those thumbnail images at the top of the window that is in the background, that is an example of an MDI system implemented in WPF
    Last edited by chris128; Jun 26th, 2009 at 05:31 PM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  5. #5

    Thread Starter
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,154

    Re: MDI Substitute

    Thanks Chris, that is a perfect example of the layout I need.

    I meant I didnt want to use a single form/window that simulated an entire mdi app and have to repopulate the nav panel each time the "child" form was changed to a new mdi form.

    So in that screen shot, what is its design like? A single window?
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  6. #6
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,598

    Re: MDI Substitute

    Not quite sure I understand the question but there would be the single 'parent' window yeah, and then however many different types of 'child' window you can have obviously.
    Thats not my application in the screenshot (as you probably guessed) but I assume the list of 'child' windows is just created by binding a listbox to a shared list that contains a reference to all of the open windows, then you would just apply your own data template to the listbox and it would automatically create a thumbnail etc for each window.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  7. #7
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,598

    Re: MDI Substitute

    Dunno if this helps but I've put together a very rough no frills MDI style WPF app for you to see what Im talking about and have attached it to this post. It took me about 10 minutes to make so obviously there is a lot of things that need doing to make it usable but it demonstrates how you could go about doing this. As I said, it leaves a lot to be desired but what it does show you how to do is:
    --- Bind a listbox to an "ObservableCollection" that contains the list of child windows, so that when we add a window to this list it automatically updates the listbox for us.
    --- Apply a custom data template to the listbox so that it displays our child window thumbnails. Note that these are "live", so if you were to mouse over a button in a child window you would also see the mouse over effect in the thumbnail

    Im sure that probably doesnt answer a lot of your questions though... but feel free to post any more that you have and I'll do my best to help out (im not exactly a WPF guru myself though!)
    Attached Files Attached Files
    Last edited by chris128; Jun 27th, 2009 at 05:40 AM.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  8. #8

    Thread Starter
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,154

    Re: MDI Substitute

    Thanks Chris. This helps. I can redesign some of the apps architechure within a given limit and I think this is within that.

    As an app overview I think creating a "Dashboard" as the parent form with each functional section as a separate window will work well for this first "module" of the application. I think if I break these apps out by function I can group the forms better and smaller/lighter.

    I guess there is no real reason to try to maintain an actual MDI design. This should simplify things greatly. Thanks and yes I will post more WPF questions. We do have to drive up the traffic in WPF forum, right
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  9. #9
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,598

    Re: MDI Substitute

    haha exactly
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  10. #10

    Thread Starter
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,154

    Re: MDI Substitute

    I should be back on this next week and have some questions.

    Need to fix 3 urgent bugs tomorrow and then see if qa "creates" anymore lol.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  11. #11

    Thread Starter
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,154

    Re: MDI Substitute

    Deployment night so I get to do work on this again while we wait for tech ops to finish
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  12. #12
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,598

    Re: MDI Substitute

    cool let us know how it goes
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  13. #13

    Thread Starter
    Super Moderator RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,154

    Re: MDI Substitute

    Just getting a chance to work on it now. Its 2am and still in the ofice

    I'm gonna check out some videos and tuts first. Arg the pain of relearning
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Star Wars Gangsta Rap Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel Core 2 Extreme Ed., 2 WD Raptor 10K RPM 300 GB HDs, 2 GBs DDR2 667 MHz RAM, 2 Viewsonic 24" LCDs, Windows 7 SP-1/Windows 8.1, Office 2010, VS 2013

  14. #14
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,598

    Re: MDI Substitute

    Yeah it is quite horrible not being able to do basic things in WPF that you could do in Winforms but it doesnt take that long to get used to it and realise how to do it
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  15. #15
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Re: MDI Substitute

    Hey chris,

    Can you walk me through how you got that mdi window to show in the listbox? I tried to duplicate it in c# but I must be missing something and am unable to find it. Any help is appreciated.
    If I helped you please rate me.

  16. #16
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,598

    Re: MDI Substitute

    Which bit are you struggling with? All you should need to do is set the ItemsSource property of the listbox to a collection, in this case that collection is a list of the currently open windows.
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  17. #17
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Re: MDI Substitute

    Yeah that is what I did. Maybe I missed something. I will try to create a new project and see if maybe something happened to it.
    If I helped you please rate me.

  18. #18
    Hyperactive Member
    Join Date
    Jan 2009
    Posts
    448

    Re: MDI Substitute

    I am getting this error:

    Window must be the root of the tree. Cannot add Window as a child of Visual.
    If I helped you please rate me.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.