KiXforms Forum Index KiXforms
The Forum for the KiXforms Community
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
 Quick Links 
Site News
Downloads
Documentation
Donations
Script Archive
Tracking Systems

wkix32.exe left running

 
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic
View previous topic :: View next topic  
Author Message
kelp7
KiXforms Dabbler
KiXforms Dabbler


Joined: 16 Jun 2008
Posts: 9

PostPosted: Tue Jul 08, 2008 11:30 am    Post subject: wkix32.exe left running Reply with quote

Hi,

I have quite a problem. I have a script making use of KixForms and this presents a number of buttons to click on the main form. One of these buttons is 'Quit' which exits the script. This works fine. However, if the script is stopped via clicking on the red cross ('X') in the top-right of the window then wkix32.exe is left running in the background as a process. Anyone got any ideas why this is or how it can be prevented? I only realised this was a problem when my script stopped executing correctly after a few runs of it and started to slow the system down.

cheers
Back to top
View user's profile Send private message
Shawn
KiXforms Developer
KiXforms Developer


Joined: 22 Feb 2003
Posts: 1983
Location: Canada

PostPosted: Tue Jul 08, 2008 2:08 pm    Post subject: Reply with quote

Sounds like the script isn't leaving the DoEvents loop for some reason, are using the "standard" loop, something like this:

While $Form.Visible
$= Execute($Form.DoEvents)
Loop

or you running a modified version ?
Back to top
View user's profile Send private message
kelp7
KiXforms Dabbler
KiXforms Dabbler


Joined: 16 Jun 2008
Posts: 9

PostPosted: Tue Jul 08, 2008 4:25 pm    Post subject: Reply with quote

Shawn wrote:
Sounds like the script isn't leaving the DoEvents loop for some reason, are using the "standard" loop, something like this:

While $Form.Visible
$= Execute($Form.DoEvents)
Loop

or you running a modified version ?


Hi,

Thanks for the quick response. Initially I *was* using that loop. In my application I wanted different forms to appear and disappear. So on the main $Form (as you have above) I have a button which the user clicks on to go to a new 'window', i.e. a new form. I don't want multiple forms cluttering up the screen, so when one form opens, the previous one closes (using the $Form.Hide and $Form.Show as an example). I was worried that if I used $Form.Hide in the function that opens up a new form on the screen then the entire loop might come to halt.

Heh, but now I'm thinking about it, that shouldn't be the case should it? As at the end of my new form, when the user exits this new form, $Form.Show is brought into use again (and $Form2.Hide to close the new form)...

I guess I should've just tried it. The way I have it working at the moment is, i've set up a variable at the top of the script called $Exit and initialised it to 0. So the While loop hangs on this. While $exit = 0 is what holds the main loop together. There's a 'quit' button the user can click on on the main $form which sets $Exit to 1....

Ah well... i think you've given me the answer really Wink (thank you very much!!) Wink
Back to top
View user's profile Send private message
kelp7
KiXforms Dabbler
KiXforms Dabbler


Joined: 16 Jun 2008
Posts: 9

PostPosted: Tue Jul 08, 2008 4:52 pm    Post subject: Reply with quote

Yep, tried it, there's no longer a problem Wink

thanks again.
Back to top
View user's profile Send private message
Jochen
KiXforms Devotee
KiXforms Devotee


Joined: 05 Mar 2003
Posts: 1204
Location: Stuttgart, Germany

PostPosted: Tue Jul 08, 2008 9:11 pm    Post subject: Reply with quote

kelp7 wrote:
I was worried that if I used $Form.Hide in the function that opens up a new form on the screen then the entire loop might come to halt.


One clever thing to do in this case is to give all child-/sub-/follow-up-forms a different name. Quite self-explaining once you did this Wink

_________________
Jochen

Tell me, and I will forget.
Show me, and I may remember.
Involve me, and I will understand.
Back to top
View user's profile Send private message MSN Messenger
Display posts from previous:   
Post new topic   Reply to topic    KiXforms Forum Index -> Starters Code Clinic All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group