Key ins

Moderator: Rathinagiri

Post Reply
Marino
Posts: 10
Joined: Thu Jul 31, 2008 3:35 pm
Location: Italy

Key ins

Post by Marino » Tue Feb 16, 2016 12:46 pm

Hi group

how can i activate key Ins in runtime ?

Best Regards
Marino

User avatar
gfilatov
Posts: 658
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Has thanked: 24 times
Been thanked: 227 times
Contact:

Post by gfilatov » Tue Feb 16, 2016 12:52 pm

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:
Kind Regards,
Grigory Filatov

"Everything should be made as simple as possible, but no simpler." Albert Einstein

Marino
Posts: 10
Joined: Thu Jul 31, 2008 3:35 pm
Location: Italy

Post by Marino » Tue Feb 16, 2016 5:17 pm

Thank you Grigory

Post Reply