Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.clipper.visual-objects > #4675 > unrolled thread
| Started by | Stefan Überbacher <info@sanosoft.com> |
|---|---|
| First post | 2013-01-29 08:07 -0800 |
| Last post | 2013-01-31 00:50 -0800 |
| Articles | 16 — 10 participants |
Back to article view | Back to comp.lang.clipper.visual-objects
How to implement a waiting process Stefan Überbacher <info@sanosoft.com> - 2013-01-29 08:07 -0800
Re: How to implement a waiting process "Valery N." <mustangsoftcom@gmail.com> - 2013-01-29 08:17 -0800
Re: How to implement a waiting process Karl Faller <k.faller_withoutthat_@onlinehome.de> - 2013-01-29 18:05 +0100
Re: How to implement a waiting process Stefan Überbacher <info@sanosoft.com> - 2013-01-29 22:27 -0800
Re: How to implement a waiting process Massimo Bighelli <info@arcasistemi.it> - 2013-01-29 18:15 +0100
Re: How to implement a waiting process Stefan Überbacher <info@sanosoft.com> - 2013-01-29 22:29 -0800
Re: How to implement a waiting process Gustavo Biasone <rosario.soft@gmail.com> - 2013-01-29 09:49 -0800
Re: How to implement a waiting process Stefan Überbacher <info@sanosoft.com> - 2013-01-30 00:15 -0800
Re: How to implement a waiting process Peter Gargos <pgargos@atlas.cz> - 2013-01-30 12:42 -0800
Re: How to implement a waiting process "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2013-01-30 08:35 +0100
Re: How to implement a waiting process Grzegorz Ramotowski <ramotny64@gmail.com> - 2014-01-04 07:40 -0800
Re: How to implement a waiting process "Francesco F." <francescangeli.f.remove@remove.gmail.com> - 2014-01-06 21:03 +0100
Re: How to implement a waiting process Grzegorz Ramotowski <ramotny64@gmail.com> - 2014-01-07 11:42 -0800
Re: How to implement a waiting process "Daniel Rouers" <daniel.rouers@nospam.csa.fr> - 2013-01-30 08:46 +0100
Re: How to implement a waiting process Mathias <mathias.hakansson@consultec.se> - 2013-01-30 22:21 -0800
Re: How to implement a waiting process Stefan Überbacher <info@sanosoft.com> - 2013-01-31 00:50 -0800
| From | Stefan Überbacher <info@sanosoft.com> |
|---|---|
| Date | 2013-01-29 08:07 -0800 |
| Subject | How to implement a waiting process |
| Message-ID | <ea391c04-1921-4487-abca-96087a42e314@googlegroups.com> |
Hi, a ShellWindow opens in its Show-Method a ChildWindow. The ChildWindow starts a job and sets a OnWorking-flag on true. When the user closes the ShellWindow, it should wait until the ChildWindow has finished the job (OnWorking = false) and then close. Any idea how to implement such a waiting process? Stefan
[toc] | [next] | [standalone]
| From | "Valery N." <mustangsoftcom@gmail.com> |
|---|---|
| Date | 2013-01-29 08:17 -0800 |
| Message-ID | <4f92819b-7f26-4772-81e7-ee6c04195b93@w7g2000yqo.googlegroups.com> |
| In reply to | #4675 |
Probably, it is useful to you: http://mustang-soft.com/ru/node/39 Unfortunately, text in Russian. But it is possible to use google- translate.
[toc] | [prev] | [next] | [standalone]
| From | Karl Faller <k.faller_withoutthat_@onlinehome.de> |
|---|---|
| Date | 2013-01-29 18:05 +0100 |
| Message-ID | <9a0gg8l4o61htpg732fvdbspgqroaqigt5@4ax.com> |
| In reply to | #4675 |
Stefan, has the child to be non-modal? Karl >Hi, > >a ShellWindow opens in its Show-Method a ChildWindow. The ChildWindow starts a job and sets a OnWorking-flag on true. When the user closes the ShellWindow, it should wait until the ChildWindow has finished the job (OnWorking = false) and then close. Any idea how to implement such a waiting process? > >Stefan
[toc] | [prev] | [next] | [standalone]
| From | Stefan Überbacher <info@sanosoft.com> |
|---|---|
| Date | 2013-01-29 22:27 -0800 |
| Message-ID | <645cc869-243d-4afd-a910-fd65102b747b@googlegroups.com> |
| In reply to | #4677 |
Yes, it has to be non-modal.
[toc] | [prev] | [next] | [standalone]
| From | Massimo Bighelli <info@arcasistemi.it> |
|---|---|
| Date | 2013-01-29 18:15 +0100 |
| Message-ID | <ke903c$nrg$1@speranza.aioe.org> |
| In reply to | #4675 |
Intercept the Closing event of the Shell, and do not close if OnWorking = true (maybe in a loop with a timer to escape) *Massimo Bighelli* ARCA Sistemi S.r.l. Il 29/01/2013 17:07, Stefan Überbacher ha scritto: > Hi, > > a ShellWindow opens in its Show-Method a ChildWindow. > The ChildWindow starts a job and sets a OnWorking-flag on true. > When the user closes the ShellWindow, it should wait until > the ChildWindow has finished the job (OnWorking = false) > and then close. Any idea how to implement such a waiting process? > > Stefan >
[toc] | [prev] | [next] | [standalone]
| From | Stefan Überbacher <info@sanosoft.com> |
|---|---|
| Date | 2013-01-29 22:29 -0800 |
| Message-ID | <8beb091e-80c5-4a83-8113-29e2766adde1@googlegroups.com> |
| In reply to | #4678 |
I've already tried, but the loop blocks the job in the child.
[toc] | [prev] | [next] | [standalone]
| From | Gustavo Biasone <rosario.soft@gmail.com> |
|---|---|
| Date | 2013-01-29 09:49 -0800 |
| Message-ID | <174cdcb9-b07c-4144-9125-33d50a0db53b@googlegroups.com> |
| In reply to | #4675 |
El martes, 29 de enero de 2013 13:07:57 UTC-3, Stefan Überbacher escribió: > Hi, > > > > a ShellWindow opens in its Show-Method a ChildWindow. The ChildWindow starts a job and sets a OnWorking-flag on true. When the user closes the ShellWindow, it should wait until the ChildWindow has finished the job (OnWorking = false) and then close. Any idea how to implement such a waiting process? > > > > Stefan Hi Stefan, You can install a timer when user try to close the shellwindow (QueryClose event) and OnWorking flag is true. In this case, don't close the window (return false from QueryClose) and install a timer that checks for that flag every x seconds and close the shellwindow when condition is met. HTH Gustavo Biasone
[toc] | [prev] | [next] | [standalone]
| From | Stefan Überbacher <info@sanosoft.com> |
|---|---|
| Date | 2013-01-30 00:15 -0800 |
| Message-ID | <143aee10-02aa-4e77-80b2-c214497a5294@googlegroups.com> |
| In reply to | #4679 |
Gustavo, the ShellWindow has just a Timer, but you got me on the right track. You must put the loop that watch the OnWorking-flag in a separate thread. Thank you all for your tips.
[toc] | [prev] | [next] | [standalone]
| From | Peter Gargos <pgargos@atlas.cz> |
|---|---|
| Date | 2013-01-30 12:42 -0800 |
| Message-ID | <20b58b99-c8d0-461a-a5e5-b0b76943d917@s9g2000yqd.googlegroups.com> |
| In reply to | #4685 |
On 30 led, 09:15, Stefan Überbacher <i...@sanosoft.com> wrote: > Gustavo, > > the ShellWindow has just a Timer, but you got me on the right track. You must put the loop that watch the OnWorking-flag in a separate thread. Thank you all for your tips. Hi Stefan, simply send message from child win to shell win. WM_USER+xxxx, afther shell win receive this message, you can enable closing. Peter G.
[toc] | [prev] | [next] | [standalone]
| From | "Francesco F." <francescangeli.f.remove@remove.gmail.com> |
|---|---|
| Date | 2013-01-30 08:35 +0100 |
| Message-ID | <keaigb$t7u$1@news.albasani.net> |
| In reply to | #4675 |
Hi Stefan,
could something like this help?
----------------------------------------------------------------------------------
LOCAL oExc AS SpawnProcess
..........
oExc := SpawnProcess{'C:\programmi\microsoft
office\office12\excel.exe','"'+QuoPath+'Quotazione.xlsx"', SW_NORMAL}
oExc:waitUntilFinished()
..........
----------------------------------------------------------------------------------
In this example, the application stops until the user close Excel.
Here the process is Excel, but it can be whatever process external to
application.
If you're interested to I can post the code, not so much stuff...
HTH,
Francesco
Il 29/01/2013 17:07, � ha scritto:
> Hi,
>
> a ShellWindow opens in its Show-Method a ChildWindow. The ChildWindow starts a job and sets a OnWorking-flag on true. When the user closes the ShellWindow, it should wait until the ChildWindow has finished the job (OnWorking = false) and then close. Any idea how to implement such a waiting process?
>
> Stefan
>
[toc] | [prev] | [next] | [standalone]
| From | Grzegorz Ramotowski <ramotny64@gmail.com> |
|---|---|
| Date | 2014-01-04 07:40 -0800 |
| Message-ID | <83f26502-557e-406d-99c4-34ad77a8ff5c@googlegroups.com> |
| In reply to | #4683 |
W dniu środa, 30 stycznia 2013 08:35:38 UTC+1 użytkownik Francesco F. napisał:
> Hi Stefan,
>
> could something like this help?
>
> ----------------------------------------------------------------------------------
>
> LOCAL oExc AS SpawnProcess
>
>
>
> ..........
>
>
>
> oExc := SpawnProcess{'C:\programmi\microsoft
>
> office\office12\excel.exe','"'+QuoPath+'Quotazione.xlsx"', SW_NORMAL}
>
> oExc:waitUntilFinished()
>
>
>
> ..........
>
> ----------------------------------------------------------------------------------
>
> In this example, the application stops until the user close Excel.
>
> Here the process is Excel, but it can be whatever process external to
>
> application.
>
>
>
> If you're interested to I can post the code, not so much stuff...
>
>
>
> HTH,
>
> Francesco
>
>
Dear Francesco,
would You be so kind and post the code?
I must execute external app in my VO code and wait until it finishes...
I use it to prepare my docs - which originally come as HTML and have a HTML-PDF converter which is external app...
I would VERY appreciate...
Best regards,
Gregory
[toc] | [prev] | [next] | [standalone]
| From | "Francesco F." <francescangeli.f.remove@remove.gmail.com> |
|---|---|
| Date | 2014-01-06 21:03 +0100 |
| Message-ID | <laf26v$uu3$1@news.albasani.net> |
| In reply to | #6457 |
Hi Gregory, one year later... wow!
Simply download spawn.aef from here:
https://www.dropbox.com/s/1g5k48jbopeb4k4/Spawn.AEF
and compile it.
Add it to your app's library, then, wherever you want:
------------------------------------------------------------------------
LOCAL oExc AS SpawnProcess
oExc :=
SpawnProcess{"yourExtAppWithPathToIt",'"'+(ParametersString)+'"',;
SW_NORMAL}
oExc:waitUntilFinished()
oExc:EndProcess()
CollectForced()
------------------------------------------------------------------------
For example, to open an XLS file:
oExc :=
SpawnProcess{"C:\ProgramFiles\Office\Excel.exe",'"MyFile.XLS"',
SW_NORMAL}
That's all. It always works for me, with other apps too...
P.S. It's not code of mine, I found it somewhere many years ago (about
'96), and the author is Normand Mongeau.
Bye,
Francesco
Il 04/01/2014 16:40, Grzegorz Ramotowski ha scritto:
> W dniu środa, 30 stycznia 2013 08:35:38 UTC+1 użytkownik Francesco F. napisał:
>> Hi Stefan,
>>
>> could something like this help?
>>
>> ----------------------------------------------------------------------------------
>>
>> LOCAL oExc AS SpawnProcess
>>
>>
>>
>> ..........
>>
>>
>>
>> oExc := SpawnProcess{'C:\programmi\microsoft
>>
>> office\office12\excel.exe','"'+QuoPath+'Quotazione.xlsx"', SW_NORMAL}
>>
>> oExc:waitUntilFinished()
>>
>>
>>
>> ..........
>>
>> ----------------------------------------------------------------------------------
>>
>> In this example, the application stops until the user close Excel.
>>
>> Here the process is Excel, but it can be whatever process external to
>>
>> application.
>>
>>
>>
>> If you're interested to I can post the code, not so much stuff...
>>
>>
>>
>> HTH,
>>
>> Francesco
>>
>>
> Dear Francesco,
> would You be so kind and post the code?
> I must execute external app in my VO code and wait until it finishes...
> I use it to prepare my docs - which originally come as HTML and have a HTML-PDF converter which is external app...
>
> I would VERY appreciate...
>
> Best regards,
> Gregory
>
[toc] | [prev] | [next] | [standalone]
| From | Grzegorz Ramotowski <ramotny64@gmail.com> |
|---|---|
| Date | 2014-01-07 11:42 -0800 |
| Message-ID | <486ca69c-a53d-400e-9354-ed210db52b40@googlegroups.com> |
| In reply to | #6459 |
W dniu poniedziałek, 6 stycznia 2014 21:03:39 UTC+1 użytkownik Francesco F. napisał:
> Hi Gregory, one year later... wow!
>
> Simply download spawn.aef from here:
>
>
>
> https://www.dropbox.com/s/1g5k48jbopeb4k4/Spawn.AEF
>
>
>
> and compile it.
>
> Add it to your app's library, then, wherever you want:
>
> ------------------------------------------------------------------------
>
> LOCAL oExc AS SpawnProcess
>
> oExc :=
>
> SpawnProcess{"yourExtAppWithPathToIt",'"'+(ParametersString)+'"',;
>
> SW_NORMAL}
>
> oExc:waitUntilFinished()
>
> oExc:EndProcess()
>
> CollectForced()
>
> ------------------------------------------------------------------------
>
>
>
> For example, to open an XLS file:
>
> oExc :=
>
> SpawnProcess{"C:\ProgramFiles\Office\Excel.exe",'"MyFile.XLS"',
>
> SW_NORMAL}
>
>
>
> That's all. It always works for me, with other apps too...
>
>
>
> P.S. It's not code of mine, I found it somewhere many years ago (about
>
> '96), and the author is Normand Mongeau.
>
>
>
> Bye,
>
> Francesco
>
>
>
> Il 04/01/2014 16:40, Grzegorz Ramotowski ha scritto:
>
> > W dniu środa, 30 stycznia 2013 08:35:38 UTC+1 użytkownik Francesco F. napisał:
>
> >> Hi Stefan,
>
> >>
>
> >> could something like this help?
>
> >>
>
> >> ----------------------------------------------------------------------------------
>
> >>
>
> >> LOCAL oExc AS SpawnProcess
>
> >>
>
> >>
>
> >>
>
> >> ..........
>
> >>
>
> >>
>
> >>
>
> >> oExc := SpawnProcess{'C:\programmi\microsoft
>
> >>
>
> >> office\office12\excel.exe','"'+QuoPath+'Quotazione.xlsx"', SW_NORMAL}
>
> >>
>
> >> oExc:waitUntilFinished()
>
> >>
>
> >>
>
> >>
>
> >> ..........
>
> >>
>
> >> ----------------------------------------------------------------------------------
>
> >>
>
> >> In this example, the application stops until the user close Excel.
>
> >>
>
> >> Here the process is Excel, but it can be whatever process external to
>
> >>
>
> >> application.
>
> >>
>
> >>
>
> >>
>
> >> If you're interested to I can post the code, not so much stuff...
>
> >>
>
> >>
>
> >>
>
> >> HTH,
>
> >>
>
> >> Francesco
>
> >>
>
> >>
>
> > Dear Francesco,
>
> > would You be so kind and post the code?
>
> > I must execute external app in my VO code and wait until it finishes...
>
> > I use it to prepare my docs - which originally come as HTML and have a HTML-PDF converter which is external app...
>
> >
>
> > I would VERY appreciate...
>
> >
>
> > Best regards,
>
> > Gregory
>
> >
Hi Francesco,
we say "late is better than never"... :)
I'll try and tell You results.
Thank You
Gregory
[toc] | [prev] | [next] | [standalone]
| From | "Daniel Rouers" <daniel.rouers@nospam.csa.fr> |
|---|---|
| Date | 2013-01-30 08:46 +0100 |
| Message-ID | <keaj4i$1tm$1@speranza.aioe.org> |
| In reply to | #4675 |
Hi Stefan, Did you try Geoff's WaitForprocess function ? https://groups.google.com/forum/?fromgroups#!topicsearchin/comp.lang.clipper.visual-objects/waitforprocess$20/comp.lang.clipper.visual-objects/RwLN-WO08ZM Daniel "Stefan Überbacher" <info@sanosoft.com> a écrit dans le message de news: ea391c04-1921-4487-abca-96087a42e314@googlegroups.com... Hi, a ShellWindow opens in its Show-Method a ChildWindow. The ChildWindow starts a job and sets a OnWorking-flag on true. When the user closes the ShellWindow, it should wait until the ChildWindow has finished the job (OnWorking = false) and then close. Any idea how to implement such a waiting process? Stefan
[toc] | [prev] | [next] | [standalone]
| From | Mathias <mathias.hakansson@consultec.se> |
|---|---|
| Date | 2013-01-30 22:21 -0800 |
| Message-ID | <e4b7756e-600e-46f0-8be2-d82224ef0ce8@googlegroups.com> |
| In reply to | #4675 |
The QueryClose event is fired when the user tries to close a window, also on the shellwindow. In the QueryClose method of your ShellWindow you can set a variable (lIWantToClose) and return false if the childwindow process is not finished. When your childwindow is finished it could check whether your mainwindow wants to close itself and then call MainWindow:EndWindow() (self:owner:EndWindow()). /Mathias Den tisdagen den 29:e januari 2013 kl. 17:07:57 UTC+1 skrev Stefan Überbacher: > Hi, > > > > a ShellWindow opens in its Show-Method a ChildWindow. The ChildWindow starts a job and sets a OnWorking-flag on true. When the user closes the ShellWindow, it should wait until the ChildWindow has finished the job (OnWorking = false) and then close. Any idea how to implement such a waiting process? > > > > Stefan
[toc] | [prev] | [next] | [standalone]
| From | Stefan Überbacher <info@sanosoft.com> |
|---|---|
| Date | 2013-01-31 00:50 -0800 |
| Message-ID | <bc161e34-e7a1-43f7-9ad6-8f6ffce2000b@googlegroups.com> |
| In reply to | #4693 |
Mathias, this solution is even simpler than the one with a separate thread.
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.clipper.visual-objects
csiph-web