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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange behaviour of numlock() and capslock()

Status
Not open for further replies.

JackTheC

Programmer
Feb 25, 2002
325
NL
In VFP6 sp5
=================
When Caps and Num are in fact ON, every messagebox should appear. But only 1 and 4 do.
When Caps or Num is ON, messagebox 4 and 5 should show up, but only 4 does.

Is this normal or is this an error in VFP?

Code:
if numlock()
	if capslock()
		=messagebox('1. Caps and Num are ON')
	endif
endif

if numlock() and capslock()
	=messagebox('2. Caps and Num are ON')
endif

if numlock()=.t. and capslock()=.t.
	=messagebox('3. Caps and Num are ON')
endif

if numlock() or capslock()
	=messagebox('4. Caps or Num is ON')
endif

if numlock()=.t. or capslock()=.t.
	=messagebox('5. Caps or Num is ON')
endif
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top