The Wiert Corner – irregular stream of stuff

Jeroen W. Pluimers on .NET, C#, Delphi, databases, and personal interests

  • My badges

  • Twitter Updates

  • My Flickr Stream

  • Pages

  • All categories

  • Enter your email address to subscribe to this blog and receive notifications of new posts by email.

    Join 1,860 other subscribers

Starting your Delphi VCL app meanwhile your mouse is moving, no accelerators are shown (Menu, button, focus rect missing… etc.) same when clicking a button to open a new form

Posted by jpluimers on 2018/07/24

Problem (D2007 and up)

If you are starting your Delphi VCL app meanwhile your mouse is moving, no accelerators are shown (Menu, button, focus rect missing… etc.)

Something similar happens when you click on a button which opens a new form, somehow UI State becomes a state which is wrong.

Solution

In a detoured Form.DoShow(Or in every OnShow event) :Self.Perform(WM_CHANGEUISTATE, MakeLong(UIS_CLEAR, UISF_HIDEACCEL or UISF_HIDEFOCUS), 0);

  • No repaint penalty
  • no flicker
  • accels
  • focus rect are always shown
  • system is not touched.

Source: [WayBackSo, here is the thing…If you are starting your Delphi VCL app meanwhile your mouse is moving, no accelerators are shown (Menu, button, focus rect mis… – Attila Kovacs – Google+

Related: [WayBackc# – Show Hotkeys at All Times – Stack Overflow

–jeroen

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.