Bentley Communities
Bentley Communities
  • Site
  • User
  • Site
  • Search
  • User
MicroStation
  • Product Communities
MicroStation
[Archived] AskInga Wiki Change system colour for disabled menu item with this macro
    • Sign In

    • -AskInga
      • +3D MicroStation
      • +AccuDraw Secrets
      • +Animation - Rendering
      • +Behind The Scenes
      • +Cells
      • +Colours
      • +Conversion - Translation
      • +Coordinate Input
      • +Design Settings
      • +Dimensions
      • +DWG
      • +EDG
      • +Element Manipulation
      • +Element Properties
      • +Element Selection
      • +Freeware - Shareware
      • -Interface Look And Feel
        • Add a line separator in a barmenu
        • Add custom file types to list files of type
        • Add your favorite web-site to the menu bar
        • Adding icons to your tools
        • Adjust the response time for pop-up dialogs to close
        • Adjust width of message center
        • All about function keys and function key menus
        • An introduction to templates, tasks and tools
        • Auto-hide the tools settings when cursor gets too close
        • Auto-restore status bar
        • Barmenu wars - comments from CCM
        • Change how levels are displayed in the attributes dialog
        • Change screens
        • Change system colour for disabled menu item with this macro
        • Change the weight of your V7 element handles
        • Change your task bar icon
        • Create clickable screen menus
        • Create custom icons with ease
        • Customize the width of the level picker
        • Customize where to use position mapping
        • Customizing your mouse buttons
        • Default button and function keys
        • Dialog box IDs
        • Dialog column display
        • Disable auto-highlighting when passing cursor over elements
        • Dock stuff to the left of file in the menu bar
        • Don't show tools you seldom use
        • Easier access to level locks and other stuff
        • ESC to go home
        • Exceed function key character limit
        • Export MicroStations icons from the open DGN library
        • Extract information from dialogs
        • Faster switching between folders
        • File icons in the MicroStation manager
        • Fly with Barmenus - Part 1
        • Fly with Barmenus - Part 2
        • Fly with Barmenus - Part 3
        • Get dialog IDs from an external file
        • Get rid of tool boxes
        • Get to the keyin window faster
        • Give MicroStation an antiqued look
        • How to customize displayed columns in MicroStation manager
        • Importing customization from M01 and STG files
        • Improve on the Dmsg sinkall toggle command
        • Improved dynamics in MicroStation V8.5 will rock you
        • Keyin for the menu bar
        • Keyin for toggling the message center
        • Keyin to toggle dialogs on and off
        • Keyin toggle for the status bar
        • Keyins for the WinOpen Windows file open dialogs
        • Keyins or data point tentative point and reset
        • Keyins to toggle dialogs and toolboxes (pre-V8)
        • Keyins to toggle toolboxes (V8)
        • Left-handers unite change position mapping to your side
        • Load different function key menus
        • Make your toolbox pop up and down
        • Maximize real estate when drawing with ByLevel definitions
        • Maximum number of open GUI items
        • Miss the old main tool frame in MicroStation V8 XM Edition
        • Missing snaps
        • Move the menu bar
        • Navigate through task list quicker
        • Open current task as pop-up under your cursor
        • Open dialogs from primary tools under your cursor
        • Open the main task or toolbox near your cursor
        • Pop-up menu in the models dialog
        • Position mapping continues to work if toolbox is closed
        • Press and hold the reset for pop-up menu
        • Prevent tool boxes from changing orientation when moving
        • Prompts too long
        • Put the focus in the tool settings dialog
        • Put the focus into the tool settings window when a tool is selected
        • Quick select with position mapping
        • Quickly change screens on dialogs
        • Remove open URL from file menu
        • Remove send from the file menu
        • Remove send viecon plot from the file menu
        • Reorder the task list
        • Restore deleted menu items in MicroStation V8 XM Edition
        • Restore menu bar customizations
        • Right click menu in the tool settings box
        • Save your messages
        • Set the pointer circle to a different colour
        • Sidebar Menus
        • Small triangles mysteriously showing up in your views
        • Stuck dialogs
        • Swap user interfaces on the fly
        • Tips for Barmenus
        • Toggle the display of the ACS triad
        • Transparent dialogs
        • Turn on-off positional mapping aids
        • Unwanted datapoints
        • Use shift to activate representative or previous tool
        • Useful DMSG keyins
        • Using a tablet take a peek at the new V8.5 menu
        • Using Named Expressions to drive interface items – A sample
        • Using WinOpen to change MicroStation's dialogs
        • Utilize the space beside the menu bar to dock tool boxes
      • +Internet - E-Links - Links
      • +Keyins
      • +Levels
      • +Line Styles
      • +Models
      • +MSM Archive
      • +Other
      • +Presentations
      • +Printing - Plotting
      • +Programming - Automation
      • +Rasters - Images
      • +References
      • +Tags - Data Fields - Fields
      • +Text - Fonts - Annotation
      • +Views
      • +Windows - Interacting With
      • +Workspaces - Configuration
    • graffiti

     
     Questions about this article, topic, or product? Click here. 

    Change system colour for disabled menu item with this macro

    AskInga logo

    Original Article Date: Aug 12, 2005 

    With thanks to Peter Overtoom from Bentley's Technical Support Group in Hoofddorp for this VBA code that changes the system text colour used for displaying disabled menu items. And, as always, thanks to Rudi Wells for passing it along. This code is especially cool for those of you with ailing eyes, or for the color-blind. :-)

    Can you see this text well enough?

    If not, then keep reading......

    Note:
    The colour value used for the above text, and all other user interface items, is definded by the operating system - not the application. The following VBA code will change this system colour and the changes will be evident in *all* applications including MicroStation.

    From any design file, just run the following code in a new VBA:

    Private Declare Function SetSysColors Lib "user32" (ByVal nChanges As Long, _
    lpSysColor As Long, lpColorValues As Long) As Long
    Private Sub main()
    Dim SysColor(1) As Long
    Dim ColorValues(1) As Long
    SysColor(0) = 17 'Disabled text
    ColorValues(0) = RGB(125, 125, 125) 'Dark Grey
    SetSysColors 1, SysColor(0), ColorValues(0)
    End Sub

    Note, you only have to do this once for the changes to stick.
    Also, in the event that you want to set your machine back to normal, use these RGB values: 192, 192, 192

    This program is supplied as is. This program does not come with support. AskInga, Bentley Systems Inc., and the author of the program assumes no liability for damages direct, indirect, or consequential, which may result from the use of this program. Use this program at your own risk.

    AskInga Article #258

    • Askinga
    • Colours
    • FreewareShareware
    • Article
    • Share
    • History
    • More
    • Cancel
    • Hannah Blye Created by Hannah Blye
    • When: Wed, May 28 2008 3:50 PM
    • Inga Morozoff Last revision by Bentley Colleague Inga Morozoff
    • When: Mon, Jun 14 2010 8:57 AM
    • Revisions: 4
    • Comments: 0
    Recommended
    Related
    Communities
    • Home
    • Getting Started
    • Community Central
    • Products
    • Support
    • Secure File Upload
    • Feedback
    Support and Services
    • Home
    • Product Support
    • Downloads
    • Subscription Services Portal
    Training and Learning
    • Home
    • About Bentley Institute
    • My Learning History
    • Reference Books
    Social Media
    •    LinkedIn
    •    Facebook
    •    Twitter
    •    YouTube
    •    RSS Feed
    •    Email

    © 2023 Bentley Systems, Incorporated  |  Contact Us  |  Privacy |  Terms of Use  |  Cookies