dcsimg
Results 1 to 7 of 7

Thread: Window style MDIChild on Windows 10

  1. #1

    Thread Starter
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,400

    Window style MDIChild on Windows 10

    I have a MDI application which looks quite odd when running on Windows 10.
    All normal windows have the Windows 10 look and feel, but the MDIChild windows have a kind of Windows 7 aero style.

    I did some some research but this seems not to be related to VB6, .Net MDIChild forms also have Win7 appearance.

    Does anyone encountered/developed a solution/method to make MDIChild forms have to same style as normal forms?
    Attached Images Attached Images  

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Posts
    19,984

    Re: Window style MDIChild on Windows 10

    I doubt there is any way around this. Even Microsoft MDI programs display this way.

    This may be because MDI has been deprecated for a long time. They keep it working but have not modified how child Forms are rendered.

    I'm not saying it is impossible, but it might require some tricky subclassing (MDI Child windows have a different default handler "DefMDIChildProc" as far as I can tell from a cursory glance. You might have to "owner draw" using calls into the UxTheme.dll to get metrics, colors, etc.

  3. #3

    Thread Starter
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,400

    Re: Window style MDIChild on Windows 10

    Thanks for your reply.
    My application really needs to be a MDI application.
    Maybe a can use an existing "skinning" project to mimic a normal form.

    Or maybe try to make a normal form to behave like an mdi child.
    This request is as old as VB6 itself if you search the internet.

  4. #4
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,183

    Re: Window style MDIChild on Windows 10

    Quote Originally Posted by Arnoutdv View Post
    My application really needs to be a MDI application.
    Maybe a can use an existing "skinning" project to mimic a normal form.
    For Win10 there's no real "skinning"-tool needed - below is a little Demo,
    what one can accomplish without any APIs or SubClassing in 5 Minutes:
    MDITest.zip

    Here a ScreenShot:


    The Resizing-Border has (on Win8) the same Color as the MDI-BackGround -
    (it's what's left over, after deactivating all Caption-Buttons and the Caption itself).

    In case that's useful - what remains is to define a DragArea and the Dragging-Code (which would be one single API-call).

    HTH

    Olaf

  5. #5

    Thread Starter
    PowerPoster Arnoutdv's Avatar
    Join Date
    Oct 2013
    Posts
    3,400

    Re: Window style MDIChild on Windows 10

    Thanks Olaf, certainly a neat idea!

  6. #6
    PowerPoster
    Join Date
    Feb 2006
    Posts
    19,984

    Re: Window style MDIChild on Windows 10

    If you decide to "fake it" like that, be sure to test with alternate theme settings such as the various high-contrast themes for users with vision problems. It may also fall apart as Windows 10 continues to change over time.

  7. #7
    PowerPoster
    Join Date
    Jun 2013
    Posts
    4,183

    Re: Window style MDIChild on Windows 10

    Quote Originally Posted by dilettante View Post
    If you decide to "fake it" like that, be sure to test with alternate theme settings such as the various high-contrast themes for users with vision problems.
    The 3 "Label-Symbols" are based on TrueType-Fonts (which should scale along with different DPI-settings)...
    And the ForeColor and BackColor-settings are based on SysColor-Constants.

    Here is the Demo without any applied Code- or Property-changes in a HighContrast-Setting:

    (on WIn8, on Win10 the Main-Form-Caption should follow along accordingly).

    Quote Originally Posted by dilettante View Post
    It may also fall apart as Windows 10 continues to change over time.
    Well, hat's true for any Application or Application-feature (as e.g. ADO-usage ).

    But I guess the "Win32 Window-State-Handling" (Min-, Max- Normal) per right-aligned Buttons will not go away anytime soon (on a Desktop-OS).

    Olaf

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