Please enable JavaScript to view this site.

KOL/MCK - User Guide

The OnClick event does not fire for the form normally. This is because OnClick fires in response to a selection command, which is not the same thing as a mouse click. Those. for most window controls, a mouse click causes a command to be sent to that window item or its sub-item, but generally speaking, a selection command can also be sent as a result of pressing certain keys, such as the spacebar (on a button) or mnemonic code assigned to the item. A command is a WM_COMMAND or WM_NOTIFY window message with the corresponding NM_CLICK notification code (and the same goes for menu items), as a result of which the OnClick event is triggered according to the rules of Windows OS. But the form, as you might guess, is not a control, and clicking on it does not send such a message.

 

However, it is possible to handle the OnClick event for a form if you assign it by assigning the address of the event handler to the OnFormClick property (as opposed to OnClick). For a form, processing of the OnClick message is performed only as a result of pressing the mouse button on it (on the area free of child visual elements).

 

In the case of using MCK, only the OnClick event for the form continues to be displayed in the Object Property Inspector, but when the code is generated by the TKOLForm object, the value is assigned to the OnFormClick event - in the case of a form. That is, technically in the case of MCK, both of these events are equivalent for the form.

 

There is a peculiarity of using the OnClick event for a form, which appears when you double-click on the form. Namely, OnClick is called twice - once for each click. And if you assign both events (OnformClick and OnMouseDblClk), then the events will be called for each double click in the following order: OnClick, OnMouseDblClk, OnClick.

 

KOL / MCK User Guide - Created by Carl Peeraer - Diamant Soft, based on the work of Vladimir Kladov - Artwerp.be

  

Keyboard Navigation

F7 for caret browsing
Hold ALT and press letter

This Info: ALT+q
Nav Header: ALT+n
Page Header: ALT+h
Topic Header: ALT+t
Topic Body: ALT+b
Exit Menu/Up: ESC