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!

Making Main FoxPro Screen Closable

Status
Not open for further replies.

ontsjc

Technical User
May 17, 2000
113
Hello all,

I have an application that I'm writing where I want the user to be able to close the whole application by selecting the "X" button in the corner of the main FoxPro Screen. In my main procedure I issued:

_Screen.closable = .T.

However, I find that after venturing to some far off corners of my application, the "X" button becomes unavailable and I can't get it back. Any suggestions?
 
Hope you have
_SCREEN.TITLEBAR = 1
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
IF youm have no forms open, it should be there (the X that is). It only becomes unavailable if you programmatically set the CLOSABLE property to .F. or if you have a modal form open.

HTH,
Weedz (Wietze Veld) They cling emotionally to code and fix development rather than choosing practices based on analytical assesments of what works best. - Steve McConnell
 
Hi!

ontsjc, X button is available just after app running, right? When you press it, it shows message box 'Canot Quit FoxPro' and disables that button. Right? It is default behavior of VFP. Take a look to the ON SHUTDOWN command. Make a procedure in your main PRG module, at app startup before READ EVENTS specify 'ON SHUTDOWN DO ShutdownProc'. In tha procedure close all forms using _Scrren.Forms collection, than clear events and quit.

Hope this helps.
Vlad Grynchyshyn
vgryn@softserve.lviv.ua
The professional level of programmer could be determined by level of stupidity of his/her bugs
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top