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!

Form cannot be modified 1

Status
Not open for further replies.

k2a

Programmer
Jun 26, 2012
133
DE
A form cannot be modified any more but works correctly when starting it from Run.

When I try to Modify it, a blank window pops up and an object window also appears in it such as Form1.Init.
Because it is not shown as a scx-file no modifications are possible at the form itself.

What could cause such a behavior?

Regards
Klaus
 
More information needed, please:

1. What do you mean when you say that it is "not shown as a scx-file"? Do you mean the file extension is not SCX? If so, have you tried changing it? (And also that of the corresponding SCT?)

2. What is the blank window you are referring to? Is it a code editing window, or what?

3. In what way can't you modify the form? Do you mean you can't edit the code? Or change the properties? Or move controls around? Or what?

4. What happens when you try to modify it? Do you see a message saying you can't do it? Does it allow you to make the changes, but not allow you to save them? Or what?

5. Have you checked that the SCX and/or SCT file is not read-only?

6. Is it possible that another instance of VFP, or another user on the network, is trying to modify or run the same form?

If you could clarify the above points, we can no doubt help you out.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
>an object window also appears in it such as Form1.Init.
What do you mean? A code editor window?
Just close it, the form should be behind it.

Bye, Olaf.
 
Thank you all for your responce.

Let me try to explain a bit in detail.

When modifying any form, the form appears as embedded in the Form Designer. Now lets assume you enter a field and right click and hit code, a code object window pops up. Such a window olso appears when modifying the faulty form.

Running to modify that faulty form in question, then a new window pops up, which should be the Form Designer but it is totally empty and stretched over the whole screen. A code object window from that form appears simultaneously on it.

Those wrong stretched window has a blue header like strip but nothing on it and there is no end on either side. The only way I found to close it, is to hit the ESC key. The code object window itself behaves correct. However, because there is no form structure displayed, so this form cannot be modified.

Regards
Klaus
 
Hi,

I should also mention if right clicking on to the stretched window the pop up is the same as it would do on the Form Designer screen.

Afterward I could run the form, although invisible, and open Properties or Data environment windows or the like.

Regards
Klaus
 
The form may have very high top/left property values and therefore is outside of the forn designer area. That's all, I assume.

use the scx as table (make a copy first)
Now you can look into the third record, which has the properties of the form itself in the Properties memo.
Look out what you find there as Top and Left.

If it's huge values or below 0, change the poisition, eg Top=0 Left=0 should always work.

Bye, Olaf.

 
Might be a corrupted Foxuser record. (The code window opening up is being "remembered" somewhere.)
 
Oh, and if you don't feel like hacking the SCX, close the code window by keyboard and activate the command window by keyboard (press Ctrl-F2). Note I said by keyboard. You just had a code window open so SOME object on the form is selected. Any mouse click changes that condition you don't want that.

In the command window:

Code:
= Aselobj(laMyArray,1)
laMyArray[1].Autocenter=.f.
laMyArray[1].Top=0   
laMyArray[1].Left=0   && or whatever
Release laMyArray
[code]
 
USE some.scx

An SCX like many other file types of VFP, is a table, and USE does not care for the file extension, as long as the file has the correct dbf structure, especially a valid header.

See The title lists pretty much all types of files, which are DBFs, and yes, also a DBC is a DBF, a free table containing meta info about the database, the DBF paths for example, or the stored procedures (in record 3, IIRC).

How some of these tables are structured, what fields they have and what's in the fields, is also explained a bit in

Bye, Olaf.
 
Hi Olaf
None the top/left property values in that form have huge values. There must be something else what causes that Form Designer to behavior that way.

As I said the Form Designer window stretches all over the whole screen with no end on either side. The blue header bar is totally empty but the form itself is invisible. However, I may run the form or open the property window.

All this sound quite mysterious.

Regards
Klaus
 
>None the top/left property values in that form have huge values.
None of? plural?
THE top/left properties of the form itself (singular) are the only top/left of interest.

If it's not top/left, then something else. Look around. I can't help you from here, seeing nothing of your Form.SCX file

Bye, Olaf.
 
k2a said:
As I said the Form Designer window stretches all over the whole screen with no end on either side. The blue header bar is totally empty but the form itself is invisible. However, I may run the form or open the property window.

<cough>corrupted Foxuser record</cough>
 
I have looked into all of the property memo fields down the list and did not found any extreme values there. To me not the form itself is stretched over the screen but just the Form Designer window is extended.

Although it might be quite interesting to know the reason for this strange behavior but my decision will be to stop digging around. Because I have access to the objects and also may run the form it is not hard to rebuild it and is of course less time consuming.

Thank you all of you for your contributions and efforts to help.

Regards
Klaus
 
Although it might be quite interesting to know the reason for this strange behavior but my decision will be to stop digging around. Because I have access to the objects and also may run the form it is not hard to rebuild it and is of course less time consuming.

That sounds like a good decision.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
If this would be for any form, you could look into the setting of the design area in general options, but as DAN already coughed it out, you might also get a correct designer again, if you rename your foxuser.dbf and let VFP create a new one.

Bye, Olaf.
 
Glad that I did not start to rebuild the defective form yet because the faulty behavior disappeared.

Renaming the foxuser.dbf finally fixed the corrupted form.

Dan coughed it out ( “<cough>corrupted Foxuser record</cough> “) but must admit that I did not catch what he really meant.

Finally a mysterious problem got solved.

Thanks again all of you.

Regards
Klaus
 
Now you might want to find the offending record pointing to your "corrupted" form, to also regain other settings stored in your renamed foxuser.dbf

Dan is right in suspecting foxuser, as your form runs without problems. I could have made that connection earlier, too. Perhaps I'm just lucky, but I didn't have more than two issues, which could be resolved by changing data in foxuser, one was about the debugger and a watch window entry, the other I don't remember. There is a lot of different stuff stored in there, but I also never digged much, what's in there.

You'll perhaps have one or two moments of why something in the IDE is different now, that's perhaps because of a renewed foxuser. For example it sores form positions, BROWSE LAST settings for how you organized the columns widths and order and much more.

Bye, Olaf.
 
I coughed about Foxuser because it was the second time in this thread I suggested it.

As for locating the offending record, it's not a bad idea BUT.... is it really necessary? Are you sure there's only one?

You can spend a bunch of time purging uglies from Foxuser and you're left with ... what? A Foxuser still prone to corruption? If you're oblivious enough to the problems Foxuser can cause that this little foible cost you several days, turn the dang thing off! No kittens will die if you lose your last browse positions. [glasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top