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

Inexplicable behavior when I call up a form 1

Status
Not open for further replies.

german12

Programmer
Nov 12, 2001
563
DE
Inexplicable behavior when I call up a form

Up until now, a program worked well, it was called "start.prg"
- it only contained the code:
Do form start

Form Start is a form with many buttons from which I can
start various programs.
For a few days now, however, the above form does not appear immediately, but only
a blue screen on which the following calls are only possible under the WINDOWS tab:

cascade
arrange all
hide
cycle.

If I then click on "cascade", my requested form appears with the buttons for selecting various programs.

Question:
How do I get rid of this first (senceless) screen again, I really don't need it - and I can't explain, how that comes up.

Thanks
Klaus


Peace worldwide - it starts here...
 
I think I have found it:
The form start (requested) showed ".T." in its properties "Auto center" (Don't now why).
I changed it to ".F." and now is comes up immediately again.
What is a ".T." good for?

I found it, by creating another form and then compared the setting between both forms.

Klaus


Peace worldwide - it starts here...
 
Autocenter is centering a form automatically. I don't know if that helps understand what happens, because the difference of setting this ON (.T. ) or OFF (.F.) is that the form does get centered or appears at the place it appears without centering.

How many displays do you have and how large is your desktop.

The options you say appear are in the VFP IDE menu Windows to arrange IDE windows, those options don't appear instead of a form, there has to be something in your code causing that. Single stepping through the code should help. Besides all that, properties don't change suddenly out if nowhere.

Chriss
 
I think you are right, Chriss - this was not yet the solution, because now the form which appears - I could not close it because there is no closing-cross (top/left) visible.
I will be back, when I can answer your questions.

Klaus


Peace worldwide - it starts here...
 
I have now brought the requested form to its default size (it is wide enough and now I could see also the cross top/right to close it.
As you can see below in the setting, I reach the default directory where there is the form.
(it is the directory c:\entw\product).
What has to be as default include-file (one line below), so that automatically the form ("start.scx) will be on the screen.
When I start VFP 9 I would like to be immediately on the form.
That would avoid to write always "do form start" in the command window.

I had that before - and marked that line with start.prg which contained the command "do form start" - but I leave it empty in the moment.

Klaus






Einstellungen_File_Location_n1o7pt.jpg


Peace worldwide - it starts here...
 
The default directory in the option settings is easily overriden by any code doing SET DEFAULT or also CD into another directory. So that's a setting you can almost forget about. Use the environment manager instead.

Edit: I have programmed a start.prg that does MessageBox(Sys(5)+Sys(2003)) - in short, displays the default path, and it does have the path that is set in the options, true. So that should still work. i.e. the default directory isn't constant, but it is set at startup before the start program is run.

But when the form is too large or has strange coordinates or docking settings, then that may cause misbehavior, so yu don't see the form. That you see these options has to come from something else, nevertheless, because a docked form or offscreen form does not cause the VFP Windows menu items to appear instead of the form. Still the autocenter just positions the form, your problem had to be in other properties or code in Load or init.
:End of Edit


Default include file has nothing to do with the default directory. A header file is something included into a class, form or prg and contains constants, most of the time, but no code setting defaults. Changing a header file wouldn't change a form, you'd need a COMPILE before a header file change would effect a class, prg or code, because header files are taken into account while compiling only.

Chriss
 
Thank you Criss.
Again I learned more.
Klaus


Peace worldwide - it starts here...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top