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

VFP 7.0 How to hide forms 1

Status
Not open for further replies.

bettyfurr

Technical User
Mar 12, 2002
371
US
I want to totally disable a form. I know I can prevent the use of the form by putting it in the "in the top level form" and modual. I want to 1. activate form, 2. activate another form, and not let the user use the 1.form until they close the 2. form. If I put in the modal and top level form its size is control by the 1. form. I want the 1 and 2 forms as individual forms. I want to have the 1. form where there is nothing they can use until they close the 2. form.

Please help,

Betty
:-(
 

Code:
Do form form1.scx name oForm1
Do form form2.scx name oForm2
oform1.setall('enabled',.f.,'Textbox')
oform1.setall('enabled',.f.,'commandbutton')

etc....



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 

Just make form #2 independent ("In Screen") modal form. Until you are done with it, you cannot return to #1.
 
Hi Mr. Gagnon,
Would I then in the Activate of oform1. do the reverse when I closed the form2?

I thought once I issued the do form form2.scx name oform2

I could not issue any command dealing with oform2? Where would I put these?

Stella, I don't want form #2 in Form # 1. I want them independent.

Thank you,

:-(



 

Stella, I don't want form #2 in Form # 1. I want them independent.

Wasn't it exactly just what I said? Did you read it?



 
Just make the second form modal and the user won't be able to touch the first form until the second form closes.

Tamar
 
Would I then in the Activate of oform1. do the reverse when I closed the form2?

That is correct.

I thought once I issued the do form form2.scx name oform2

I could not issue any command dealing with oform2? Where would I put these?

If they are not modal, yes you can.



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
Hi Gagnon,

Your advice worked great! I gave you a gold star.

Hi Stella,

I feel sure your advice would have worked with the exception, I did not tell you that I have the _screen off. I can do not do anything that depends on "in screen" without setting this back on.

Thank all of you guys for helping me. I could not have done it without you.

Betty

:)

 

So where do you show your form #1 then?

Same setting would have worked. "In screen" or anything else is not necessary; "modal" is the key setting here, as Tamar also told you.

But whatever you prefer.
 
You may alos do without modal, when setting the "Enabled" property of the form #1 to .F. (in form#2 init) and reset it to .T. when needed.

Yes, also a form object has this property, not only controls. This way you don't block everything else (eg a menu is blocked/disabled when a form runs modal).

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top