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

INKEY(), WAIT WINDOW, Windows 7

Status
Not open for further replies.

DSummZZZ

Programmer
Oct 24, 2000
4,250
US
Okay, this is a new one on me.

I recently switched development machines and the new one came with Windows 7 installed. I also have VFP 9 SP2 installed.
For the most part, I have had minor unexpected issues with VFP. However, I stumbled onto a couple things today that have me puzzled.

One issue is obnoxious but not totally surprising. Here is a snippet:
Code:
FOR nIndex = 1 TO 5
   STORE SECONDS() TO z
   DO WHILE SECONDS() < z + 5
      WAIT WINDOW 'Waiting...' + TIME() TIMEOUT 1
      ?TIME()
   ENDDO 
NEXT
As long as VFP has focus, that code executes fine. If not, the WAIT window will not change, and the TIME() will never print.


Another issue is INKEY(). Here's another snippet:
Code:
x = 0
DO WHILE x # 27
  WAIT WINDOW 'Waiting ' + TIME() NOWAIT 
  x = INKEY(1)
  ?TIME()
ENDDO
That snippet of code won't run at all. It just sits there until VFP is in focus and a key is pressed or the mouse is moved.

I haven't had those sorts of issues in earlier versions of Windows. I haven't twiddled with CPU priorities or anything like that, but since the second snippet doesn't work in the foreground either, I can't see where that would make a difference.
Anyone else seen this sort of behavior?



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Windows 7 Ultimate 32-bit, VFP 9.0 SP2, on a Toshiba Laptop. Your program does exactly what it is supposed to do, even when it is not in focus. Responds to ESC as well. I only added set talk off, set echo off on top.

Try updating Windows 7, Also Uninstall/Reinstall VFP, try with vfp 9.0 witout any ServicePack.

Nasib
 
Windows 7 - 64 bits, VFP 9 SP1

Both snippets work exactly as they should.

Cetin Basoz
MS Foxpro MVP, MCP
 
I appreciate you all testing it for me. Today both snippets work fine. I may have had a funky session of VFP going on Friday, or maybe the computer was just ready for a weekend, but I swear! Neither were behaving properly!



-Dave Summers-
[cheers]
Even more Fox stuff at:
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top