exactly why I do it...
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
> -Original Message-
> From: dotnet discussion [mailto:[EMAIL PROTECTED]] On Behalf
Of
> Matthew Adams
> Sent: Wednesday, May 29, 2002 4:27 PM
> To: [EMAIL PROTECTED]
> Subject: Re: [DOTNET] Putting bits of UI on a secondary thread? (was
Re:
> [DOTNET] Modeless WinForms Bu
"Mcmullan, Andy (Andrew)" <[EMAIL PROTECTED]> wrote:
> What you are asking here is quite a lot. Every GUI object
> would need to check on entry to every method call whether
> the calling thread is the thread that created the object. Big
> overhead in terms of code to be written, and big performan
n a secondary thread? (was Re:
[DOTNET] Modeless WinForms Bug)
> As an aside, a quick experiment reveals that all appears to be fine if
> you start the message pump on the worker yourself (with
> Application.Run()), but it is still slightly rude, as that pool thread
> will then have a m
e: [DOTNET] Modeless WinForms Bug
Mathew,
It sure would have saved me a lot of time if an exception had been thrown !
jeff
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Presumably Microsoft thought that putting the System.Windows.Forms.Timer on
the Windows Forms Toolbox would be enough of a clue that you were supposed
to use that one for Windows Forms applications.
I guess most VB developers will look there first, since they've always
dragged timers off a tool b
Chris,
Until today, I did not even know that System.Windows.Forms.Timer existed. I needed a
timer, so I looked in System and saw System.Timer. I assumed that was the class to
use for a timer. How many other people will fall into this trap ? The other bitch I
have is that the System.Window
ehalf Of
Chris Sells
Sent: 29 May 2002 16:10
To: [EMAIL PROTECTED]
Subject: [DOTNET] Putting bits of UI on a secondary thread? (was Re:
[DOTNET] Modeless WinForms Bug)
> As an aside, a quick experiment reveals that all appears to be fine if
> you start the message pump on the worker you
gt;
Sent: Wednesday, May 29, 2002 8:04 AM
Subject: Re: [DOTNET] Modeless WinForms Bug
I created the form from my main form and called Show() from the Timer event.
By the way I have a lot of code that uses the GUI from a System.Timer event.
When I get the event, I create a Graphics object for the f
> As an aside, a quick experiment reveals that all appears to be fine if
> you start the message pump on the worker yourself (with
> Application.Run()), but it is still slightly rude, as that pool thread
> will then have a message queue created for it that may not have existed
> before.
I don't k
I created the form from my main form and called Show() from the Timer event. By the
way I have a lot of code that uses the GUI from a System.Timer event. When I get the
event, I create a Graphics object for the from and draw it without any problems !
jeff
You can read messages from the DOTNE
On Behalf Of
Ian Griffiths
Sent: 29 May 2002 15:49
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Modeless WinForms Bug
I had assumed that he had created the window on one thread and then
called
Show on a different one.
In that case it wouldn't work, it's definitely wrong, but you also do
I had assumed that he had created the window on one thread and then called
Show on a different one.
In that case it wouldn't work, it's definitely wrong, but you also don't get
an exception.
This is an instance of a more general problem: although it's positively
forbidden to use a Control from t
Never returning from a Show() method would seem to be an exception in someones code to
me !
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
2 15:09
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] Modeless WinForms Bug
Mathew,
It sure would have saved me a lot of time if an exception had been
thrown !
jeff
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop
Mathew,
It sure would have saved me a lot of time if an exception had been thrown !
jeff
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
D]
Subject: Re: [DOTNET] Modeless WinForms Bug
Ian,
Thanks, I'll try it. Shouldn't the Show() throw an exception ?
jeff
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read mess
Ian,
Thanks, I'll try it. Shouldn't the Show() throw an exception ?
jeff
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
That might be the problem. System.Timers.Timer calls you back on a thread
from the system thread pool. Of course you're not allowed to do anything to
the UI on such a thread. If you want to call Show from such a thread, then
what you should be doing is using Control.Invoke to marshal the call b
ECTED]
Subject: Re: [DOTNET] Modeless WinForms Bug
Ian,
I am using a "System.Timers.Timer" !
thanks
You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.
You can read messages from the DOTNET archi
Ian,
I am using a "System.Timers.Timer" !
thanks
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.
Which kind of timer are you using? (There are several different Timer
classes in .NET.)
--
Ian Griffiths
DevelopMentor
- Original Message -
From: "Jeff Roberts" <[EMAIL PROTECTED]>
I have a modeless form that works perfect when shown from a menu click
event, but if I try to show it fr
I have a modeless form that works perfect when shown from a menu click event, but if I
try to show it from a timer event, the Show() method never returns. Has anyone seen
this, or know a way around it ?
thank you
You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
sub
23 matches
Mail list logo