econozuloo.blogg.se

Visual basic menustrip mnu
Visual basic menustrip mnu









visual basic menustrip mnu
  1. #VISUAL BASIC MENUSTRIP MNU UPDATE#
  2. #VISUAL BASIC MENUSTRIP MNU WINDOWS 10#
  3. #VISUAL BASIC MENUSTRIP MNU CODE#

#VISUAL BASIC MENUSTRIP MNU CODE#

Some colors may be reused by theming, but the general model I have in mind is that theming uses a lot of hardcoded colors and rendering code which you only can get by going through the theming API. PS: take everything I said here with a lot of caution, its driven by 10-15 year old memory and I didn't take a close look what WinForms does today in its menu rendering. It may take more than just picking colors, you may have to call the theming rendering APIs (which I think for menus is done nowhere in WinForms currently) So someone will probably have to look into how the theming API is to be used for rendering menus/toolbars/statusbars. Using Office as reference for UI theming has no point anymore if you don't provide the kind of controls used in Office. In my opinion the main goal should be to achieve parity with the OS, which obviously has been neglected in the menu/toolbar area because for a long time Office was seen as having the superior style. I don't know if there is much value maintaining the historic Office rendering styles beyond providing it for backward compatibility to existing WinForms users. Its been a long time since Office had menus and the OS has caught up and now has its own theming and UI styling rules separate from Office. (On the native side MFC had similar classes to replicate the more modern look and feel of Office, separately of the OS controls.) The point was that at that time Office was the reference application when you wanted modern UI and it was moving at a faster pace than the OS, so WinForms probably wanted to allow taking part of that modern look and feel.

  • you have the "ProfessionalRenderer" which I think is based on Office (back when it still had menus).
  • You might have to invest some work to reproduce the "theming on" style.
  • you have the "theming on" style which is whatever the OS does natively, but I don't know if you can reproduce that in WinForms without using the deprecated HMENU based classes.
  • you have the "theming off" style which is entirely based on SystemColors (you still get that sometimes over remote connections or server farms).
  • visual basic menustrip mnu

    If I remember right the general idea is that From a quick look you have no renderer using the theming API for menus/toolbars/statusbars (but I may have missed something). I'm not entirely sure if SystemColors (and SystemRenderer) will properly reflect theming. It's a lot ^.^ but it should make them almost completely visually indistinguishable from native controls. Currently the highlight lingers until the sub-menu disappears (see last screenshot).After highlighting an item with a sub-menu and then moving cursor to a sibling item above/below, the original highlighted item should immediately become unhighlighted.Sub-menus should overlap their parent menu item by 6 pixels on the left, and be flush with the top.Checkmark should have a background color RGB(144, 200, 246) when checked, or RGB(86, 176, 250) when checked and highlighted at the same time.Fix splitter padding (it should not leak into the checkmark/image column, and be 2px from the right border).

    #VISUAL BASIC MENUSTRIP MNU UPDATE#

  • Update icon of arrow on items with sub-menus and move it up by 1 px to center it.
  • Increase padding between the items and border (1px -> 2px).
  • Fix the weird white line on the left of highlighted items.
  • Set highlighted item background color to RGB(144, 200, 246).
  • Set checkmark/image column background color to RGB(240, 240, 240).
  • Set overall background color to RGB(242, 242, 242), so that non-highlighted items and padding between items and border is this color.
  • Reduce left/right padding of menu items (appears to be 1px for border + (6px * DPI) of padding).
  • Do not invert text color of highlighted items.
  • Set highlighted item border to 1px of RGB(153, 209, 255).
  • Set highlighted item background to RGB(204, 232, 255).
  • Note that item highlight overlays the bottom border and the top of sub-menus is just below the bottom border.
  • The menu background from top to bottom is (19px * DPI - 1px) of RGB(255, 255, 255), and then 1px bottom border of RGB(242, 242, 242).
  • Make menu items flush with the left and top side of the window (no padding/border between them).
  • visual basic menustrip mnu

    I have not measured widths/heights of items, those seem mostly fine. I have done measurements on 100% and 150% DPI, and marked those that change.

    #VISUAL BASIC MENUSTRIP MNU WINDOWS 10#

    It's probably not worth matching the look of Windows 7, so I will only consider differences from the Windows 10 look.











    Visual basic menustrip mnu