DelphiFAQ Home Search:
General :: Windows :: Programming :: Windows with Delphi :: Windows Forms
Code snippets, Q+A around the Windows user interface. From a Delphi perspective, but usually applicable to other languages.


This list is sorted by recent document popularity (not total page views).
New documents will first appear at the bottom.

Only the 40 most recently viewed articles are shown.
You can see the full list here.

Featured Article

How to open a menu-item from your application

You can do this by sending keystrokes to your application using keybd_event.
E.g. to open the "File" menu, you need to send "Alt-F":

keybd_event(VK_MENU, MapVirtualkey(VK_MENU, 0 ), 0, 0);
 keybd_event(Ord('F'), MapVirtualKey(Ord('F'), 0), 0, 0);
 keybd_event(Ord('F'), MapVirtualKey(Ord('F'), 0), KEYEVENTF_KEYUP, 0);
 keybd_event(VK_MENU, MapVirtualkey(VK_MENU, 0 ), KEYEVENTF_KEYUP, 0);

Generated 0:02:05 on Sep 29, 2020