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

_SCREEN Closable Button Disables itself

Status
Not open for further replies.

kraus

MIS
Oct 16, 2000
23
US
This topic has been addressed before, but no solution that has been suggested has worked. maybe, because the description of the problem has not been adequate. i have one app developed with VFP 3.0b and another with VFP 6.0. In both apps i use an "ON SHUTDOWN" command to use the "X" button on the _screen form. In both apps there are two forms (besides the _screen). In the VFP 3.0b developed app, when i move from one form to the other, the "X" remains enabled. In the the VFP 6.0 developed app, when i move to the second form and then back to the first form, the "X" becomes disabled. when i move back to the second form again the "X" is enabled. can you please help me? i am developing on a Windows ME machine
 

Kraus,

It sounds like you've got some code in either the Activate or the Deactivate of one or other of the forms. The code is probably setting _SCREEN.Closeable to .T. or .F.

Perhaps you could check that. If that's not the solution, check to see if there is any other code that's doing the same thing.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Mike,

Thanks for your response. I have investigated those possible causes. I searched all my code for '.Closable' and '_SCREEN.Closable' and there were no other occurrences. I then put '_SCREEN.Closable = .T.' in both forms' Deactivate and Activate events and it makes no difference. As far as i can tell this doesn't happen in 3.0b, which leads me to believe it is a new property in 6.0 (not found in 3.0b) that i'm not familiar with that is turning off the closable property when i go to the second form. i just can't find it. any other ideas? Mike or anyone else?

Thank You,
Matthew Kraus
 

Matthew,

You said at the outset that these were two different apps (one in 3.0b and ther other in 6.0). There must be some differences between them that is causing this problem.

If that's right, I suggest you create a pair of simple forms with no extra controls or code, run them in 6.0, and try to reproduce the behaviour you are seeing. If you can't, gradually add the code, etc. that are in the forms that do cause the problem. When the behaviour returns, that'll tell you where the problem is.

If in fact you are running the identical app in both versions, and it is only going wrong in 6.0, that would point to a bug of some kind. But I've never heard of any such bug, and I feel sure it would have been well known if it exists.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Kraus,

As a thought, in VFP 6 there is a screen property called "Control Box" that defaults to True. You might look at setting it to False on your 'non-main' screens. That removes all of the control boxes at the top of the form - minimize, maximize and close. It still doesn't explain the behavior, but if you don't want the user to close the application from your non-main screens that should work as a solution.

Steve
 
Thanks for all your help,

unfortunately, i couldn't get the solutions offered to work. But, after many tries, i did get it to work. i set the first form to 'modeless'and the second form to 'modal'( designed in VFP 3.0 app)

again thanks for the help,

Matthew Kraus
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top