In my mainline program I have a global "survival class" that looks for the existence of a particular file every few seconds. If that file is present then the mainline gracefully closes down all the forms open at that time and then exits VFP.... this works no problem except when a print preview screen is open in which case the preview window doesn't close, in fact the mainline class is never clicks into time mode to check for the file existence.
Any quick ideas on how I can a) check for the existence of a print preview window and b) close it automatically. I think the solution will be to add the class into the report somewhere but I can't decide if this is the best approach.
Any ideas?
Dave
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB22A49B3CC@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Just wondering if the preview window shows up in a list of screens in _vfp
or _screen
Al
-----Original Message-----
Any quick ideas on how I can a) check for the existence of a print preview
window and b) close it automatically. I think the solution will be to add
the class into the report somewhere but I can't decide if this is the best
approach.
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/007e01cf120d$1921bcf0$4b6536d0$@com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Yes it does, but you can't get control to see it from the class. It is as though once the print preview has focus then all global class timers are suspended until you leave the print preview manually. So chicken and egg...
I haven't investigated thoroughly as of yet but I think this is what is happening. Any other forms open modal or non modal I can look at when the timer in the class fires but the preview window just takes control. I could look at the xsource, which is my next move but just wanted some/any quick input if people had come across this before.
Dave
-----Original Message-----
From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Allen
Sent: 15 January 2014 16:16
To: profox@leafe.com
Subject: RE: Quick ideas required...
Just wondering if the preview window shows up in a list of screens in _vfp or _screen Al
-----Original Message-----
Any quick ideas on how I can a) check for the existence of a print preview window and b) close it automatically. I think the solution will be to add the class into the report somewhere but I can't decide if this is the best approach.
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB22A49B427@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
There is a mention of a nowait clause that makes foxpro not wait for the
preview window to close
Al
-----Original Message-----
Yes it does, but you can't get control to see it from the class. It is as
though once the print preview has focus then all global class timers are
suspended until you leave the print preview manually. So chicken and egg...
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/007f01cf120e$9b0d0e80$d1272b80$@com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Maybe SYS(2040) can help?
--
rk
-----Original Message-----
From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Dave Crozier
Sent: Wednesday, January 15, 2014 11:11 AM
To: profoxtech@leafe.com
Subject: Quick ideas required...
In my mainline program I have a global "survival class" that looks for the existence of a particular file every few seconds. If that file is present then the mainline gracefully closes down all the forms open at that time and then exits VFP.... this works no problem except when a print preview screen is open in which case the preview window doesn't close, in fact the mainline class is never clicks into time mode to check for the file existence.
Any quick ideas on how I can a) check for the existence of a print preview window and b) close it automatically. I think the solution will be to add the class into the report somewhere but I can't decide if this is the best approach.
Any ideas?
Dave
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/DF1EEF11E586A64FB54A97F22A8BD044229CF29D12@ACKBWDDQH1.artfact.local
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Dave Crozier wrote:
> In my mainline program I have a global "survival class" that looks for the existence of a particular file every few seconds. If that file is present then the mainline gracefully closes down all the forms open at that time and then exits VFP.... this works no problem except when a print preview screen is open in which case the preview window doesn't close, in fact the mainline class is never clicks into time mode to check for the file existence.
>
> Any quick ideas on how I can a) check for the existence of a print preview window and b) close it automatically. I think the solution will be to add the class into the report somewhere but I can't decide if this is the best approach.
>
> Any ideas?
>
>
This might be more work than you are looking for but just been looking
at the help on print preview and found a section "Leveraging the Default
Preview Container" where it looks like you have an extension handler
class and maybe you can add a timer to the definition that will close it.
HTH
Peter
----------------------------------------------------------------
Rajan Imports has changed - we are now Whispering Smith Ltd. For more information see our website at www.whisperingsmith.com
Please update your address book with my new email address: pcushing@whisperingsmith.com
.
This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or
disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.
www.whisperingsmith.com
Whispering Smith Ltd
Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 3700 Fax:0161 831 3715
London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/52D6B938.7050102@whisperingsmith.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Pedter,
That is the way I was thinking but I didn't really want to get involved in the source.... In fact the app is using FoxyPreview which makes it more daunting. I may post a question on Codeplex and see if they can come up with any ideas.
Dave
-----Original Message-----
From: ProFox [mailto:profox-bounces@leafe.com] On Behalf Of Peter Cushing
Sent: 15 January 2014 16:37
To: profox@leafe.com
Subject: Re: Quick ideas required...
Dave Crozier wrote:
> In my mainline program I have a global "survival class" that looks for the existence of a particular file every few seconds. If that file is present then the mainline gracefully closes down all the forms open at that time and then exits VFP.... this works no problem except when a print preview screen is open in which case the preview window doesn't close, in fact the mainline class is never clicks into time mode to check for the file existence.
>
> Any quick ideas on how I can a) check for the existence of a print preview window and b) close it automatically. I think the solution will be to add the class into the report somewhere but I can't decide if this is the best approach.
>
> Any ideas?
>
>
This might be more work than you are looking for but just been looking at the help on print preview and found a section "Leveraging the Default Preview Container" where it looks like you have an extension handler class and maybe you can add a timer to the definition that will close it.
HTH
Peter
----------------------------------------------------------------
Rajan Imports has changed - we are now Whispering Smith Ltd. For more information see our website at www.whisperingsmith.com
Please update your address book with my new email address: pcushing@whisperingsmith.com
.
This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.
www.whisperingsmith.com
Whispering Smith Ltd
Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 3700 Fax:0161 831 3715 London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960
[excessive quoting removed by server]
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/18725B8CD2D5D247873A2BAF401D4AB22A49B484@EX2010-A-FPL.FPL.LOCAL
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
That's odd, I didn't see Peter's reply
-----Original Message-----
From: ProfoxTech [mailto:profoxtech-bounces@leafe.com] On Behalf Of Dave
Crozier
Sent: 15 January 2014 17:43
To: profoxtech@leafe.com
Subject: RE: Quick ideas required...
Pedter,
That is the way I was thinking but I didn't really want to get involved in
the source.... In fact the app is using FoxyPreview which makes it more
daunting. I may post a question on Codeplex and see if they can come up with
any ideas.
Dave
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/008001cf1211$1ffd1f20$5ff75d60$@com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
Allen wrote:
> That's odd, I didn't see Peter's reply
>
>
>
I don't see mine either, even though it is set in the options.
Peter
----------------------------------------------------------------
Rajan Imports has changed - we are now Whispering Smith Ltd. For more information see our website at www.whisperingsmith.com
Please update your address book with my new email address: pcushing@whisperingsmith.com
.
This communication is intended for the person or organisation to whom it is addressed. The contents are confidential and may be protected in law. Unauthorised use, copying or
disclosure of any of it may be unlawful. If you have received this message in error, please notify us immediately by telephone or email.
www.whisperingsmith.com
Whispering Smith Ltd
Head Office:61 Great Ducie Street, Manchester M3 1RR. Tel:0161 831 3700 Fax:0161 831 3715
London Office:17-19 Foley Street, London W1W 6DW Tel:0207 299 7960
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/52D6BDBC.404@whisperingsmith.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.
>In my mainline program I have a global "survival class" that looks for the
>existence of a particular file every few seconds. If that file is present
>then the mainline gracefully closes down all the forms open at that time
>and then exits VFP.... this works no problem except when a print preview
>screen is open in which case the preview window doesn't close, in fact the
>mainline class is never clicks into time mode to check for the file existence.
>
>Any quick ideas on how I can a) check for the existence of a print preview
>window and b) close it automatically. I think the solution will be to add
>the class into the report somewhere but I can't decide if this is the best
>approach.
I have this issue. I use the standard VFP preview window though, and
WEXIST() will find it (the window has a different name depending on which
report engine you use, so I test for the engine setting).
My framework has its own form manager and uses that to explicitly close all
open windows as part of a shutdown, including one called by a timer. The
form manager calls QueryUnload() though, so each form can be set up to save
any unsaved data before being closed. If the form can be used to call a
report preview, then I add code to its QueryUnload() to explicitly use
WEXIST() to find the preview window and close it as well.
I guess that's not very "quick" though. :)
Ken Dibble
www.stic-cil.org
_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/5.2.1.1.1.20140115115637.01e0d770@POP-Server.stny.rr.com
** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.