none
Best practice for a main screen and forms showing up within the main screen RRS feed

  • Question

  • I have always used isMidiContainer to set the parent form and open my forms within this form, but is this the best method?

    I guess I am looking for are there major drawbacks to this method and should I adopt a better procedure (and how) if there is one.

    I appreciate any input you can share on this topic.

    Monday, July 31, 2017 10:45 PM

All replies

  • Hello,

    In general desktop applications have moved away from MDI style, even the majority of Microsoft Office products have done this.

    An alternate method would be to use a single form with a Tab control to manage your task along with modal and non-modal windows. I can't tell you what is best for your application as I don't know the business requirements.

    In closing I'm simply making suggestions and not trying to force you down a path that you may not want to go.



    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, July 31, 2017 11:12 PM
    Moderator
  • I believe when removing your duplicate post a reply was deleted to from DA, hopefully he will repost his reply and accept my apologies for removing his post as it was not my intent.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.
    VB Forums - moderator
    profile for Karen Payne on Stack Exchange, a network of free, community-driven Q&A sites

    Monday, July 31, 2017 11:21 PM
    Moderator
  • No that's exactly what I am looking for Karen, I appreciate it. 

    I have moved over from Visual FoxPro and am re-writing all my previous applications. With that I want to implement a best practice, something that's being used by most developers, not what I learned over the last few years of VB.NET and Visual Basic training.

    I truly appreciate your input on this and will be taking it to heart, thank you.

    Monday, July 31, 2017 11:24 PM
  • You could use Model View Presenter or Model View Controller UI design pattern for Windows form UI with each form implementing the UI design pattern.

    https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93controller

    https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93presenter

    https://www.codeproject.com/Articles/228214/Understanding-Basics-of-UI-Design-Pattern-MVC-MVP

    Or you could go WPF using MVVM with MVVM being used for each WPF form/view.

    Monday, July 31, 2017 11:58 PM
  • I guess I am looking for are there major drawbacks to this method and should I adopt a better procedure (and how) if there is one.

    You should indicate what you believe are the major drawbacks with MDI.  That will allow an assessment of what you would regard as 'better'.   There is no point in making a change just because others are doing it, but if there are reasons that others are making the change, and those reasons fit with the requirements of your application, then you can take your lead from that.  I did not use MDI much in the past, but where I did use it I have changed to tabbed pages where there was a logical (though not necessarily enforced) flow to the procedure, and dockable panels where the flow was less clearly defined.

    Tuesday, August 1, 2017 12:15 AM
  • I know of no drawbacks, was asking so I didnt not continue using MDI just to find out later there was an obvious drawback that I was unaware of but was known by everyone else.
    Tuesday, August 1, 2017 12:48 AM
  • Hi Ryan,

    I think Kareninstructor's suggestion can solve your problem, if you have the better idea, please post here.

    Please remember to close your thread by marking the helpful post as answer, it is very beneficial to other community members who face the same issue.

    Thanks for your understanding.

    Best Regards,

    Cherry


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, August 9, 2017 9:08 AM
    Moderator
  • Ryan,

    Although it is still completely supported are there no changes anymore to Windows Forms. It is easy to use to make a program, but if you talk about current design which you see, then everything is done using XAML. 

    XAML is at Microsoft translated as WPF (in fact it was made for SilverLight). Be aware it is less easy to use than Windows Forms and less stable to maintenance. But if you ask of current day design you sure have to look to is. (It makes a transition to what Microsoft calls MODERN design (W10 and Smartphone) also easier.

     https://docs.microsoft.com/en-us/visualstudio/designers/designing-xaml-in-visual-studio

    Keep in mind that you see often new things starting with C# as tool. Not strange programmers at Microsoft or Open Source are not business developers, those toolmakers simply make no real big related projects in solutions. After a while we see it then used by professional business developers with VB. (C# is much easier to learn but takes more time to program with).


    Success
    Cor




    Wednesday, August 9, 2017 9:27 AM