FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour What is the suitable function to Clipper's KEYBOARD()
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
What is the suitable function to Clipper's KEYBOARD()
Posted: Tue Mar 07, 2006 04:36 PM

Hi All

Plase guide me how to post VK_TAB from the current control of a DIALOG
I.E TSBROWSE to an another CONTROL in the DIALOG automatically
without literally pressing the TAB key on the keyboard, like the way in
clipper KEYBOARD(K_TAB).

  • Ramesh Babu P
Posts: 4840
Joined: Fri Nov 18, 2005 04:52 PM
What is the suitable function to Clipper's KEYBOARD()
Posted: Tue Mar 07, 2006 06:08 PM

Here is how you can simulate Clipper's keyboard() function:

FUNCTION FwKeyboard( oWnd, nKey )

oWnd:SetFocus()
oWnd:PostMsg( WM_KEYDOWN, nKey, 0)

RETURN NIL

FWH 18.05/xHarbour 1.2.3/BCC7/Windows 10
Posts: 83
Joined: Tue Nov 08, 2005 11:09 AM
What is the suitable function to Clipper's KEYBOARD()
Posted: Tue Mar 07, 2006 06:14 PM

__keyboard(K_TAB)

Regards

Hoe, email: easywin3@yahoo.com
Posts: 654
Joined: Fri Oct 21, 2005 05:54 AM
What is the suitable function to Clipper's KEYBOARD()
Posted: Wed Mar 08, 2006 03:59 PM

Mr.James and Mr.tnhoe

Thank you very much for your reply.

Ultimately the following code by Mr.James has worked and the __Keyboard(VK_TAB) has performed an illegal operation!

>FUNCTION FwKeyboard( oWnd, nKey )

>oWnd:SetFocus()
>oWnd:PostMsg( WM_KEYDOWN, nKey, 0)

>RETURN NIL

Regards

  • Ramesh Babu P

Continue the discussion