Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to use Microsoft's On-Screen Keyboard

API Functions

How to use Microsoft's On-Screen Keyboard

by  Mike Gagnon  Posted    (Edited  )
Run the following.

Code:
Declare Long FindWindow  In WIN32API String, String
Declare Long SetWindowPos  In WIN32API Integer,Integer,Integer,Integer,Integer,Integer,Integer
Declare Long ShowWindow  In WIN32API Long, Long

HWnd = FindWindow( .Null. , "On-Screen Keyboard" )

If HWnd = 0
	Run /N osk
	HWnd = FindWindow( .Null. , "On-Screen Keyboard")
	SetWindowPos( HWnd , -1 , 1, Sysmetric(22)-300 , Sysmetric(21) , 300 , 0 )
Else
	ShowWindow( HWnd , 9 )
	SetWindowPos( HWnd , -1 , 1, Sysmetric(22)-300 , Sysmetric(21) , 300 , 0 )
Endif

Mike Gagnon
Register to rate this FAQ  : BAD 1 2 3 4 5 6 7 8 9 10 GOOD
Please Note: 1 is Bad, 10 is Good :-)

Part and Inventory Search

Back
Top