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

VFP 9.0 confounding show stopper... please help!

Status
Not open for further replies.

dmusicant

Programmer
Mar 29, 2005
253
US
I run VFP 9 many times daily, from a shortcut on my Win10 taskbar. It opens to a screen with buttons, and I choose where to go from there.

Suddenly today and without warning (I'm unaware of having made any changes at all), I open the program and see nothing. VFP is running, but nothing is visible. I don't normally run more than one instance. I right now have 4 instances running. Each extra instance I get an error message in the top left corner saying this:

-----------------------------------------------------
Program Error
-----------------------------------------------------
Row or column position is off the screen

[Cancel] [Suspend] [Ignore] [Help]
-----------------------------------------------------

Selecting the first 3 buttons changes nothing AFAIK. Selecting Help brings up VFP Help. I can see no way I can even get a command window. I have no control at all. I have restarted the machine twice to no avail.

I can proceed only by shutting down the VFP application in Task Manager. What could be wrong here and what can I do to fix it? I mean, I could obviously remove VFP entirely and reinstall, but that usually takes quite a while. Thanks for help.

PS I run VFP from a few other machines, I presume it still works on those, but this is the one I use 98% of the time, a laptop.

PPS I could go into my config.fpw with a text editor and change the startup sequence and get a command window, but don't know why I have to or where to look for the cause of the issue.
 
The problem is not only persisting, my efforts to resolve it are revealing disturbing new developments. I just posted the following to Anandtech Forums' Windows subforum:

So, a few hours ago my data app stopped working. Just wouldn't show up when I started it. I posted at for help but no reply there yet. So I reinstall the app (Microsoft Visual FoxPro 9.0) and problems persist.


In the process of this my wallpaper turned from rotating JPGs to a checkerboard blue.


Most concerning is that my data on the PC has all disappeared!!!


It's Windows 10 64bit laptop. The data was all under C:\data. That folder isn't there! I have no idea what could have screwed things up. Now, I keep my important data on my NAS, and I have no reason to believe anything has happened to that! But where is my local data??? What could have deleted it, or made it opaque to me?


Now, the only out of usual thing I did today with this machine was run a test on one of my 16GB thumb drives. I used the utility C:\Programs\h2testw_1.4_USB_Test_Utility\h2testw.exe. It's a simple utility that I don't believe you even have to install, you just run the EXE and tell it what drive to analyze and I chose the thumb drive, D:. I interrupted its execution because it was taking too long, by pressing the [Abort] button.


Before discovering that C:\Data and subdirectories was missing I tried to restore order by restoring Windows to a restore point. I only saw one to restore to which had today's date. I went through with that but Visual FoxPro 9.0 would still not open.


The laptop is a Lenovo P1 and around a year old refurb (warranted to April 2022) and has a 256GB SSD.


I do not see my \Data folder in my recycle bin. What do you suggest? Reset the machine to factory defaults (I think I have that option?), and reinstall everything and cross my fingers???
 
I found my data! C:\Data was here...

C:\Brother\Data

Brother directory was to support my Brother printer. Its software created it. I have no idea what moved my Data folder under C:\Brother, but I moved it back. However, my VFP 9.0 still doesn't work. Thanks for any clarification/help on this. I really don't know what's caused this or how to deal with it. Conceivably I accidentally moved my Data folder clicking around, but I'm not generally that careless! I'm good with Windows, Explorer, etc.
 
FINALLY! Got VFP working. Reinstalled it from scratch. Even then it didn't work. I had to configure it to run as administrator. Now, I AM an administrator, so why did I have to do this? I've installed Foxpro dozens of times, and VFP likely 20 times. Never had to reconfigure it before to run as administrator. And why it stopped working today with seemingly no provocation, is beyond me. That utility I ran, it seems unlikely that had anything to do with this. Why my data moved is to me mysterious as well, although I can't rule out the possibility I made a mistake in Explorer, it seems very unlikely. I wasn't messing around with that stuff.
 
Sounds like your data got moved by an accidental drag and drop, the rest of it, no idea.

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
I suppose we COULD blame this on a Windows Update, that ran while you were working on something, and crashed out of your carefully prepared environment and ruined your FoxUser files...

Update P's me off regularly, why not you too - better then blaming yourself for a clumsy drag and drop?

Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
Window position of screen is stored, I guess that's it. A reinstall does not reset registry keys, so it stays.
Not sure but try if a change to any normal user account helps, not admin. Just because parts of the registry are user-specific - just like your profile, namely the whole HKEY_CURRENT_USER branch.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Another very general tip: Having problems with your VFP usually only delete foxuser.dbf (or rename it) and see if that already solves the problem.
If you expect some basic settings to be wrong then [tt]DO vfpclean.app[/tt]

If you get to no conclusion but reinstalling, first uninstall.
Yes, there is a chance a reinstallation of an already installed product detects that, there is a repair installation mode, not so much with VFP, that's also why the vfpclean.app utility exists.

You should deduce, that most of your valuable settings are in foxuser.dbf. For example window positions, settings down to columns withs of Browse per alias.
Some settings are in the registry, also the ones that control the _screen and command window positions. Most often the problem is you work on a multi-display setup and then only on one display.

After starting VFP, even if it is offscreen, but you see it running in task manager, focus typically is in the command window, so use it:
Code:
move window 'command' to 0,0[enter]
If that doesn't work focus might be elsewhere, the command window may be closed, Nut the menu hotkeys should work, so use CTRL+F2 and then try again
Still not working: Try CTRL+A and DEL to clear the command window and then try again.

Still not seeing anything? Try
Code:
_screen.move(0,0)[enter]

Also, make windows visible:
Code:
_screen.visible = .t.
show window 'connand'

If neither of this works you might bring up the debugger window in it's separate window. That is, if you configure it as such - it's a good reason to have the option set to start the debugger separately by setting envornment to "Debug Frame" instead of "FoxPro Frame", which would put a child window into _Screen.
with
Code:
SET STEP ON[enter]
or pores ALT+T (Tools) then ALT+B (Debugger).

And then write commands to the watch window as _vfp.docmd("your command")
Just remember to remove these entries from the watch window, as it executes them not just once. It's there to watch/monitor expressions, so it will update them regularly by reevaluating them. In case of adding _vfp.docmd("show window 'command'") you will have a hard time closing the command window while the debugger runs.

Bye, Olaf.

Olaf Doschke Software Engineering
 
OK, thanks, people!

I don't know that I even have an alternate user account but can certainly create one if for no other reason that to test if a problem persists using an alternate account.

VFP seems to be working OK now.

Interesting idea that Windows Update scrambled things, running in the background. Plausible.

vfpclean.app, don't recall hearing about it before. I presume (?) it's somewhere in my VFP tree. I can just run that? Of course, yesterday, I was unable to even get a command prompt. I did get to one late in the evening somehow. That's when I started getting hopeful. I'd already tried repairing VFP using the install disk. That didn't fix the problem. Then I uninstalled VFP and reinstalled. Then I hit on running as administrator because I got some message about that messing with the icon in my tray, IIRC. Don't remember ever having to do that before, actually run VFP as administrator, being forced to set that up before it would run.

Good idea, Olaf, deleting the foxuser.dbf, it didn't occur to me.

Yeah, I think there's a good chance deleting the foxuser.dbf would have solved the problem. I am not using multiple screens with this laptop. It's a 15.6" display, OK for me on my lap, which is where I use it. Honestly, yesterday's shenanigans got me thinking of buying an alternate laptop! I have one but it's terrible, really slow compared to this one, which is decently high end. Need to RMA it when the time is right, it has issues, but issues I can work around. Nagging issues, but the warranty runs another 2 years. An alternate laptop of good quality is something to consider.

Now you said run:

move window 'command' to 0,0[enter]

Where can I execute that if I can't see a command window? Now, I do have other computers so I guess I could create an EXE that runs that! I do have an EXE on this machine that I ran yesterday successfully just before things started working right. It pulls some data from a table and places it on my clipboard.

IIRC, I did try CTRL+F2 yesterday and didn't see a command window. Have never heard of CTRL+A and DEL. That closes any command window allowing you to open one with CTRL+F2?

Yeah, where do I enter that stuff, e.g. _screen.move(0,0) [enter] ?? Just type it even though I see no command window, assuming there is one but it's not visible??

And SET STEP ON [enter] ... again, assuming that there's an invisible command window operational, I suppose.

Amazing stuff about the watch window that I didn't know about. Glad I started this thread, potentially very useful info, and I imagine it could help others who find themselves in a similar situation.
 
Once more

myself said:
After starting VFP, even if it is offscreen, but you see it running in task manager, focus typically is in the command window, so use it:

So you type blindly.

And the first things should make the command window visible.

Besides: vfpclean.app is in Home(), and it can also be executed by double click from Windows Explorer, as long as APP is associated with VFP corretly.

And again once more:
myself said:
If you get to no conclusion but reinstalling, first uninstall.
You keep the registry keys and probably intact foxuser if you just try a repair reinstall.
VFP is not the Office suite, there is no real repair mode in the VFP setup.

You only get a clean machine also with remoed registry keys and removed foxuser, if you UNINSTALL. And then install again.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Thank you, Olaf, for the excellent clarifications! I will evidently (I suppose) need to reconfigure a lot of things now, e.g. my browse windows field widths and field order, probably have to set up my default font size in memo fields.

EDIT! Actually, I'm not seeing that necessity. My browses and font in Memo fields seem unaffected even though I reinstalled VFP (after an uninstall, I believe). I suppose my foxuser.dbf persisted... it must have. I did install in the same location.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top