Window screen app behavior like On screen keyboard

Viewed 82

This is my first time I using c++ builder 10 vcl form, how can set a window form behavior like On screen keyboard I interesting in this feature:

A dialog can send key input to any foreground window without itself being activated to function as an on-screen keyboard. Regular windows get activated and focused when they are clicked or something. To avoid this, a window needs to be a non-activating window. You can do this by creating a window with the "WS_EX_NOACTIVATE" extended style, or by modifying its style using "ModifyStyleEx".

Source: https://www.codeproject.com/Articles/32563/Virtual-On-Screen-Keyboard-Example

In uMain.cpp I tried to set this code but not work:

#include <fmx.h>
#pragma hdrstop

#include "uMain.h"
// ---------------------------------------------------------------------------
#pragma package(smart_init)
#pragma resource "*.fmx"
TForm2 *Form2;

void __fastcall TForm2::CreateParams (TCreateParams &Params)
 {
   TForm2::CreateParams(Params); // inherited
    Params.ExStyle = Params.ExStyle | WS_EX_NOACTIVATE;
 }

Note: In the Gui option column left, I have a option Formstyle I set StayonTop and work, but I have no see nothing relation to my case.

I appreciate any advice.

0 Answers
Related