I found my problem and it wasn't with how my events were setup it was how I was handling my results. In my code examples above in the submit_Click event:
My problem was since this was orginally a command line script I was putting all the code in the display_results sub, I modified the code in there to redirect the output to a variable using select
. I know I read an article about the evils of this command in Win32 but I can't find the node right now. I believe the credit goes to Tilly.
When I took this line out and cleaned up my code to be both Command line and GUI aware, everything was working great!
Are you posting in the right place? Check out Where do I post X? to know for sure.
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
Want more info? How to link
or How to display code and escape characters
are good places to start.