FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour Auto selectable menu.
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Auto selectable menu.
Posted: Mon Jul 04, 2011 06:22 AM

Guys:

I had a small program to rebuild all indexes from all tables (20+), the menu allows the user to select the specific table that will get its indexes recreated. Some tables got over 500,000 records. Instead of having the user wait for each table to complete its course, how can I, via an menu option, put in the keyboard buffer the accelerator key for each option ? In the old Clipper days this was done with the KEYBOARD command or with the KEYSEND() function. Any ideas ? Thank you.

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Auto selectable menu.
Posted: Mon Jul 04, 2011 08:52 AM
Code (fw): Select all Collapse
__KEYBOARD( cString )


EMG
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Auto selectable menu.
Posted: Mon Jul 04, 2011 08:55 AM

Enrico:

Thank you for your response. Can the ACCELERATOR keys be put in the keyboard buffer, for example Alt-I ?

Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: Auto selectable menu.
Posted: Mon Jul 04, 2011 08:57 AM

I don't know, sorry.

EMG

Posts: 99
Joined: Thu Jul 12, 2007 02:02 PM
Re: Auto selectable menu.
Posted: Mon Jul 04, 2011 04:40 PM
Add to source keybrd.c the function
Code (fw): Select all Collapse
CLIPPER __PUTACCKEY( PARAMS )
{
   int vKeyAcc = _parni( 1 ), vKey = _parni( 2 );
   
   PostVirtualKeyEvent( vKeyAcc, FALSE );

   PostVirtualKeyEvent( vKey, FALSE );
   PostVirtualKeyEvent( vKey, TRUE );

   PostVirtualKeyEvent( vKeyAcc, TRUE );

   SysRefresh();
}


Example:

__PUTACCKEY( VK_MENU, VK_F2 ) // Alt + F2
__PUTACCKEY( VK_CONTROL, VK_F3 ) // Control + F3

Best regards
Massimo :-)
Posts: 723
Joined: Tue Sep 04, 2007 08:45 AM
Re: Auto selectable menu.
Posted: Mon Jul 04, 2011 05:23 PM

Massimo:

Thank you. I'll give it a try.

Continue the discussion