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!

Not showing Form in design mode 1

Status
Not open for further replies.

SitesMasstec

Technical User
Sep 26, 2010
502
BR
Hello colleagues!

I am able to run a form of my VFP9 application, please see bellow:
Cadasrec2Runtime_jvgbxj.jpg


But if I click on Modify this form in my project to make some changes I do not have access to it. It opens as a completely blank form:
Cadasrec2Form_fxgwtr.jpg


What can be wrong?


Thank you,
SitesMasstec
 
Looks like you need to move the form to the right, since the left border is outside the IDE.

Or run this command from the command window:
Code:
Move Window "Form Designer - xxx.scx" center
Replace xxx with the name of your form.
 
Tore:

I tried your two advices. First, trying to move the form window with the mouse, and second, using the command
Code:
 Move Window "CADASREC2.scx" center

It haven't worked.

I took a screen shot of it:
Cadasrec2FormProp_jsdx9h.jpg


And an error appears when (with the form opened) I do the command

Code:
Move Window "cadasrec2.scx" center
Cadasrec2FormMove_qimw1c.jpg
 
You must have the form open for editing when you run the command.
If no success, can you upload the form?
 
Tore told you exactly what you need. You shortened his template to use "Form Designer - xxx.scx" to only "xxx.scx"

The Form designer window title is not just "CADASREC2.scx" it is literally (and I mean literally literally, letter by letter) "Form Designer - cadasrec2.scx" and that's what you need to specify in MOVE WINDOW - the full caption/title.

Even better use
Code:
ZOOM WINDOW "Form Designer - cadasrec2.scx" NORM FROM 0,0 TO 30,30

It'll now be too small, but visible and you can resize it with the mouse.

Chriss
 
Oh, Chriss, so I would have to literally type what Tore had advised me...

Now I can see the form with all elements, thank you both! I had to have typed "Form Designer - ...

I am wondering what had happened to this form to go that blank way. I have other similar forms, and since I am using VFP for Windows, I have never experienced this problem. I even had a fearful thought it was some Windows 10 issue with VFP 9, but now thank to you and Tore this bad thought vanished.


Thank you,
SitesMasstec
 
The problem was not with your form, but with a too big Form designer window, the window that contains your form in design mode, a window of the IDE.

Chriss
 
What could have changed the IDE window for this particular form? I have similar forms, and I have never had this problem.

Maybe I could have typed Ctrl End, for instance, with the form was opened... and saved it.


Thank you,
SitesMasstec
 
It happens rarley, but happens, that IDE windows configuration become wrong. Again, it is not caused by the SCX, the SCX does not determine the size and position of the designer window, that is determined by IDE settings, the SCX only determines its position within the designer window. When you see a blank designer that's not pointing out the SCX form position is off, it can also be the size and position of the designer window is off, when you look at the property window and see top/left is 0,0 and width and height are also normal, the SCX is out of this game. And you did look into properties and found nothing unusual, didn't you? You didn't think about and still seem to not get the role of the designer window.

The designer window often is maximised, so its title bar disappears and you only see the form in design mode in a blank area. But the designer window is still there, when you modify a SCX (or also a form class of a VCX) you see that SCX form inside a window. And positions and sizes of both can cause nothing or only unimportant/blank parts to be seen. You only think of the effect of the SCX properties and SCX file corruptios or similar reasons.

Be aware that even in maximised mode a form designer is still a window and inside of it is your SCX, you see a window in a window and this SCX form/window in the designer window also is in a third window, in _screen. Not that important, but you overlook the fact this nesting could even go on more levels. The designer window has more than just the role to display your form in design mode, it also defines the designer context menu and the designer area, which by the way always is larger than just the display. And that's also why you could scroll off to a blank area. In non maximised state the designer window left/top position can also be left or over the display with negative coordinates. It's also possible to put SCX forms into negative coordinate areas. In your case the blue title bar was revealing you see at a designer window that's left upper corner is left of the display, which hides the SCX form, even if that's at 0,0. Just think about it.

Chriss
 
I had that same problem.
I fixed it by opening the form and then using "save as" to create a copy and then use the new form, without reusing the old name.
 
Thanks for the tip, I see you even joined tek-tips for posting it, welcome.

Unfortunately, it doesn't work when you're in the same situation as SitesMasstec.

Here's reproduction code to get into the same situation:
Code:
CREATE FORM misaligneddesignerform.scx NOWAIT
ZOOM WINDOW "Form Designer - misaligneddesignerform.scx" NORM AT -1000,-1000 SIZE 1000,1000

I tried your solution, but if I do as suggested and use File->Save As and give a new SCX file name, that SCX form inherits the problem.

There is a simple temporary solution to double click the blue bar (that's the title bar of the designer), as that maximises the designer. But the moment you change the designer window back to normal mode, the old misaligned position and size lets you only see the titlebar of the designer window and not the scx form.

The solution is as already said:
Code:
ZOOM WINDOW "Form Designer - misaligneddesignerform.scx" NORM FROM 0,0 TO 30,30
That makes the designer window too small, but you're back into full control about its position ans size.

The question how the designer gets this totally misaligned position and overflowing size is not cleared, but likely some glitch that only happens rarely, you surely not manually misalign the form designer with such a ZOOM command, but you might usually design in maximized designer mode and that wrong designer window could even exist for a long time and only be seen when you change from maximized to normal window mode.

To show what I mean, notice the buttons controlling the main IDE window and the designer window are not very intuitively positioned, when you're in maximized designer mode:
idevsdesignerbuttons_k6lstg.png

The middle button of the designer window buttons put the designer window into "normal" mode, which means it can float freely and usually will have a smaller than maximized size, but can also have a position starting off screen (left) and a size larger than the screen, which results in only the title bar being visible as SitessMasstec posted:
Cadasrec2Form_fxgwtr_ahqmfo.jpg


And that's the problem situation my reproduction demo code creates in the first place. You get to a normal view of the SCX with a double click on the blue bar, maximizing the designer, you get back to the problematic state when putting the designer window back to "normal" mode with the middle button of the designer window buttons. But you only get back to a situation where the designer window works both maximized and in normal (free floating, positionable, sizable) mode, when using the ZOOM ... NORM FROM 0,0 TO 30,30 solution. You can also use a more sensible size than 30,30 in the first place, but the major thing it does is getting the designer window back to normal - really normal.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top