Page 1 of 1

Key ins

Posted: Tue Feb 16, 2016 12:46 pm
by Marino
Hi group

how can i activate key Ins in runtime ?

Best Regards
Marino

Re: Key ins

Posted: Tue Feb 16, 2016 12:52 pm
by gfilatov
Marino wrote:Hi group

how can i activate key Ins in runtime ?
Hi Marino,

It is possible with the following C-function:

Code: Select all

HB_FUNC( KEYTOGGLENT )
{
   BYTE wKey = ( BYTE ) hb_parni( 1 );

   keybd_event( wKey, 0x45, KEYEVENTF_EXTENDEDKEY | 0, 0 );
   keybd_event( wKey, 0x45, KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP, 0 );
}
Usage from the Harbour code is below:

Code: Select all

KeyToggleNT ( VK_INSERT )
Hope that helps :idea:

Re: Key ins

Posted: Tue Feb 16, 2016 5:17 pm
by Marino
Thank you Grigory