Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: tushar Kanvinde
  Where is tushar Kanvinde?
 Kolhapur, Maharastra
 India
 tushar Kanvinde
 To: andrew kabz
  Where is andrew kabz?
 kampala
 Uganda
 andrew kabz
 Tags
Subject: RE: Cannot Quit Visual Foxpro
Thread ID: 311040 Message ID: 311042 # Views: 48 # Ratings: 0
Version: Visual FoxPro 9 Category: Forms
Date: Tuesday, June 28, 2011 12:59:05 PM         
   


> Hello Experts, when i close my form, it quits the whole application, however when i use the main quit button, it tells me I cannot quit visual foxpro, how can i terminate the read events cycle by closing the main foxpro close button. without using the form exit. This is my code in my main program, any help to make it better is also welcome
>
>
****************************************
> SET DATE BRITISH
> SET CENTURY on
> SET SAFETY OFF
> SET TALK ON
> SET SYSMENU to
> SET SYSMENU AUTOMATIC 
> ZOOM WINDOW SCREEN MAX 
> *****************************************
> 
> **********************BACKGROUND IMAGE********************
> lcImage = "c:\mileage\images\rhsp4.jpg"
> * Center Image
> lcBgType = "ISOMETRIC"
> * Stretch image
> *lcBgType = "STRETCH"
> * Stretch image while maintaining its original proportions
> *lcBgType = "ISOMETRIC"
>  
> IF NOT PEMSTATUS(_Screen, "oImg", 5)
> 	_Screen.AddObject("oImg", "Image")
> ENDIF
>  
> WITH _Screen.oImg
> 	.Visible = .F.
> 	.Stretch = 0
> 	.Picture = lcImage 
> 	DO CASE
> 	CASE lcBgType == "STRETCH"
> 		.Top     = 0
> 		.Left    = 0
> 		.Stretch = 2
> 		.Height	 = _Screen.Height
> 		.Width	 = _Screen.Width
> 	CASE lcBgType == "ISOMETRIC"
> 		.Stretch = 1
> 		.Height	 = _Screen.Height
> 		.Width	 = _Screen.Width
> 		.Top  = (_Screen.Height - .Height) / 2
> 		.Left = (_Screen.Width - .Width) / 2
> 	CASE lcBgType == "CENTER"
> 		.Stretch = 0
> 		.Top  = (_Screen.Height - .Height) / 2
> 		.Left = (_Screen.Width - .Width) / 2
> 	OTHERWISE	
> 		.Top  = 0
> 		.Left = 0
> 		.Stretch = 0
> 	ENDCASE
> 	.Visible = .T.
> ENDWITH
> *******************************************************
> DO FORM 'c:\LIBRARY\forms\frmEx1Splash.SCX'
> READ EVENTS
> 
> DO FORM 'c:\library\forms\login.scx'
> *READ EVENTS
> 
> 
> DO 'c:\library\menus\libmenu.mpr'
> READ EVENTS
> CLEAR EVENTS 
> ON ShutDown
> QUIT 
> 
> ************************
> PROCEDURE myShutDown
> CLEAR EVENTS
> ON SHUTDOWN 
> QUIT 
> ************************
> DO myshutdown
> ******END OF NEW CODE******
> 

> Regards
> Andrew

Give

ON SHUTDOWN DO MyShutDown

before the READ EVENTS.

Do not use full paths when calling forms, etc. You will not be able to move the project from one driver/folder to another. Use relative paths instead.

Regards
Tushar

ENTIRE THREAD

Cannot Quit Visual Foxpro Posted by andrew kabz @ 6/28/2011 12:52:22 PM
RE: Cannot Quit Visual Foxpro Posted by tushar @ 6/28/2011 12:59:05 PM
RE: Cannot Quit Visual Foxpro Posted by andrew kabz @ 6/28/2011 1:06:16 PM
RE: Cannot Quit Visual Foxpro Posted by tushar @ 6/28/2011 1:36:12 PM
RE: Cannot Quit Visual Foxpro Posted by andrew kabz @ 6/28/2011 2:07:22 PM
RE: Cannot Quit Visual Foxpro Posted by andrew kabz @ 6/28/2011 3:09:53 PM
RE: Cannot Quit Visual Foxpro Posted by tushar @ 6/28/2011 4:55:17 PM
RE: Cannot Quit Visual Foxpro Posted by andrew kabz @ 6/28/2011 5:10:14 PM