Key ins

Moderator: Rathinagiri

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

Key ins

Post by Marino »

Hi group

how can i activate key Ins in runtime ?

Best Regards
Marino
User avatar
gfilatov
Posts: 1060
Joined: Fri Aug 01, 2008 5:42 am
Location: Ukraine
Contact:

Re: Key ins

Post 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:
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

Re: Key ins

Post by Marino »

Thank you Grigory
Post Reply