[Tutor] Cancelling Threads

FxItAL@aol.com FxItAL@aol.com
Tue, 21 Nov 2000 13:30:45 EST


--part1_d9.c9130c2.274c1955_boundary
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

Hi All,

       I've a small program that uses one thread which is invoked with a 
"Start" Button.  I can cancel this thread with a "Cancel & Close" Button. My 
Question is how do I associate the "Cancel & Close" command function with the 
Windows Close Program "X" in the upper right hand corner of the program box?

"Cancel & Close" function:

def EndProg2():
    UserEntryMin.set("0")
    UserEntryHour.set("0")
    end.set("2")
    ActionButCmd()
    root.destroy()

Thanks for any help, Al

--part1_d9.c9130c2.274c1955_boundary
Content-Type: text/html; charset="US-ASCII"
Content-Transfer-Encoding: 7bit

<HTML><FONT  SIZE=2>Hi All,
<BR>
<BR> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;I've a small program that uses one thread which is invoked with a <BR>"Start" Button. &nbsp;I can cancel this thread with a "Cancel &amp; Close" Button. My <BR>Question is how do I associate the "Cancel &amp; Close" command function with the <BR>Windows Close Program "X" in the upper right hand corner of the program box?
<BR>
<BR>"Cancel &amp; Close" function:
<BR>
<BR>def EndProg2():
<BR> &nbsp;&nbsp;&nbsp;UserEntryMin.set("0")
<BR> &nbsp;&nbsp;&nbsp;UserEntryHour.set("0")
<BR> &nbsp;&nbsp;&nbsp;end.set("2")
<BR> &nbsp;&nbsp;&nbsp;ActionButCmd()
<BR> &nbsp;&nbsp;&nbsp;root.destroy()
<BR>
<BR>Thanks for any help, Al</FONT></HTML>

--part1_d9.c9130c2.274c1955_boundary--