Problem with Mouse and F10 key ...

Just starting out? Need help? Post your questions and find answers here.
RASHAD
PureBasic Expert
PureBasic Expert
Posts: 4991
Joined: Sun Apr 12, 2009 6:27 am

Re: Problem with Mouse and F10 key ...

Post by RASHAD »

Try

Code: Select all

	If OpenWindow (1, 10, 10, 800, 600, "Keyboard Functionkey test ...", #PB_Window_SystemMenu)
		If OpenWindowedScreen (WindowID (1), 0, 0, 800, 600, 0, 0, 0)
			ClearScreen ($FF202020)

			KeyboardMode (#PB_Keyboard_Qwerty)
			AddKeyboardShortcut(1, #PB_Shortcut_F10, 100)
			....
			....
			....
			....
			If KeyboardPushed (#PB_Key_F10)
				Debug "F10 key - pushed"
				SendMessage_(WindowID(1), #WM_COMMAND, 1<<16|100, 0)
			EndIf
Egypt my love
marc_256
Addict
Addict
Posts: 857
Joined: Thu May 06, 2010 10:16 am
Location: Belgium
Contact:

Re: Problem with Mouse and F10 key ...

Post by marc_256 »

@Shardik
Thanks for the link ...

@RASHAD
Thanks, this works very well. 8)

@breeze4me
Also thanks, but the solution of RASHAD is a little smaller,
and for me simpler to understand. :oops:

greetings
Marc
- every professional was once an amateur - greetings from Pajottenland - Belgium -
PS: sorry for my english I speak flemish ...
Post Reply