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

define windows not working correctly for me

Status
Not open for further replies.

JulieAB

Programmer
Jul 14, 2004
11
US
Hi all!

I am taking an old foxpro application and changing it to vfp 7.0

I have found that many of the old define window statements result in a shadow, where the title line is repeated underneath itself. What is weird is that if there is > 1 window on the screen at once it seems only the first one defined has this problem.

Another problem I have is that even when I put something in the footer, it never appears in my application.

If anyone can help me out with a suggestion I would greatly appreciate it!! I have carefully read the vfp help but have not been able to resolve the issue.

Here is one of the offending define window statements and some other related code after it.

define window budbrow ;
from 7,12 to 32,68;
title "BUDGET" ;
footer "[F4] to search - [F7] to add new record";
nofloat nogrow ;
color "w+/w,w+/n,b/bg,b/bg,,b/w,,,"

activate window budbrow
browse fields deptcode :8 ;
:h = "Deptcode" :v=allp("vdept",deptcode) :p="!!!!!!!", ;
empl :4 :h = "Empl" , per :3 :h= "%", ;
dollar :7 :h= "Amount", start :10 :h="Start", ;
end :10 :h="End", proj :4 :h="Proj" ;
nomenu ;
in window budbrow
 

I am taking an old foxpro application and changing it to vfp 7.0

I have found that many of the old define window statements result in a shadow, where the title line is repeated underneath itself. What is weird is that if there is > 1 window on the screen at once it seems only the first one defined has this problem.

Is your intention to keep the old code running under VFP7.0, or redesigning it using the VFP's advancements, like prehaps a grid might work for you rather than defining a window.


Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Anytime you try to run FP DOS code in VFP under Windows, you are likely not to get exactly the "expected" results.

I don't see the "shadow" or duplicated title, but you'll never get the footer to work - footers are simply not supported in Windows (FPW or VFP). (There's a reference to this feature's lack of suppotr back in the FPW help file.)

Bottom line is that while almost all of the syntax of FP DOS is still supported, not all the same visual results are.

Rick
 
Thanks for your responses Mike and Rick.

My intention right now is just to get the app up and running in VFP without taking full advantage of the OO available in VFP. The plan is that only later on, if there is time for taking full advantage of the OO features, would I attempt that.

I was hoping I could get the app up and running and looking decent with minimal changes to code initially. The current code is pretty big and the people that use it depend upon it for many dozens of reports. I found that I could convert all the reports and that worked well. Right now I am just tweaking the code as written in Foxpro, rather than rewriting.

Thanks for the tip on footers and the general tip about how VFP just plain acts differently sometimes Rick.

Mike asked "Is your intention to keep the old code running under VFP7.0, or redesigning it using the VFP's advancements, like prehaps a grid might work for you rather than defining a window."

Rick said "I don't see the "shadow" or duplicated title, but you'll never get the footer to work - footers are simply not supported in Windows (FPW or VFP). (There's a reference to this feature's lack of suppotr back in the FPW help file.)

Bottom line is that while almost all of the syntax of FP DOS is still supported, not all the same visual results are."

Best regards,
Julie
 
I have offered this suggestion many times to people upgrading older applications to the Visual Foxpro world, so I'll repeat it for you.

If you can separate your screen code from your other code, you will make the conversion much easier.

By having the screen code clearly differentiated from the operational code (including screen GET When's, Valid's, etc.) then you can keep the other code and merely put it into the appropriate place so that it will operate correctly.

The screen code being isolated and "cellularized" will allow you to replace that code "module" with a VFP Form.

It can be one step towards an easier conversion.

Good Luck,
JRB-Bldr
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top