Victor BA


I started programming in VFP, and i'm having a bad time running forms, each time i run it can work or not, but after i stop running it and try to open the form for designing purposes or modifications, sends the message "File is in use"...everytime..

I have to close VFP an reopen it so i can use it again

I tried the CLOSE ALL command, but still when i open the project again and choose the form to design, sends the same message...

what i'm i doing wrong

I hope you can help me Smile Thank you




Re: Still "File is in use"

dni


When you run the form how do you close it You need to use thisform.release if you hace a close button.

If you open the form designer mode you can run it from menu and if you have a error you can suspend the execution via debugger choose fix, and you will be back in designer mode.

Usually what you said is happening when you run a form and after use it is not properly released and if you try to use same form to modify it then you have the error message, because the form is still running.







Re: Still "File is in use"

Victor BA

Well , now that you mention it, i didn't use a button to close the form, i just clicked the X in the controlbox on the form, i thought it was the same, but i did what you suggested and works fine Smile with thisform.release, i didn't see the problem at all.

By the way, i added a menu to the form, and the Exit function to close the program, but i used the same thisform.release and didn't work (i configured the menu result as "command" and placed the code in the textbox). Is it different to close a form from the menu






Re: Still "File is in use"

dni

You may try to put in exit command from menu

FormName.release






Re: Still "File is in use"

Victor BA

Yeah, it worked!!, i never tried with the form name, thank you very much!! Smile