HighTechTalks DotNet Forums  

Yielding control to windows

Dotnet Academic General Discussions microsoft.public.dotnet.academic


Discuss Yielding control to windows in the Dotnet Academic General Discussions forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
=?Utf-8?B?RWl0YW4=?=
 
Posts: n/a

Default Yielding control to windows - 06-13-2007 , 02:08 PM






Hello,

While in extensive math calculation in MFC application, i used to yield
control to windows by calling this code:

void YieldControl( void )
{
MSG msg ;
if( ::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
{
::TranslateMessage( &msg ) ;
:ispatchMessage( &msg ) ;
}
}

How can I do similar thing in .Net application?

Thank you,
Eitan Barazani




Reply With Quote
  #2  
Old   
AlexS
 
Posts: n/a

Default Re: Yielding control to windows - 06-13-2007 , 02:26 PM






Take a look at
http://msdn2.microsoft.com/en-us/lib...(vs.80).a spx
and also at Thread.Sleep and yield statement. Yielding depends on what you
are doing.

HTH
Alex

"Eitan" <Eitan (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hello,

While in extensive math calculation in MFC application, i used to yield
control to windows by calling this code:

void YieldControl( void )
{
MSG msg ;
if( ::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
{
::TranslateMessage( &msg ) ;
:ispatchMessage( &msg ) ;
}
}

How can I do similar thing in .Net application?

Thank you,
Eitan Barazani







Reply With Quote
  #3  
Old   
=?Utf-8?B?RWl0YW4=?=
 
Posts: n/a

Default Re: Yielding control to windows - 06-13-2007 , 02:52 PM



Thank you!
Eitan

"AlexS" wrote:

Quote:
Take a look at
http://msdn2.microsoft.com/en-us/lib...(vs.80).a spx
and also at Thread.Sleep and yield statement. Yielding depends on what you
are doing.

HTH
Alex

"Eitan" <Eitan (AT) discussions (DOT) microsoft.com> wrote in message
news:895BA4FB-3E7F-4D02-86C8-FE0D67191539 (AT) microsoft (DOT) com...
Hello,

While in extensive math calculation in MFC application, i used to yield
control to windows by calling this code:

void YieldControl( void )
{
MSG msg ;
if( ::PeekMessage( &msg, NULL, 0, 0, PM_REMOVE ) )
{
::TranslateMessage( &msg ) ;
:ispatchMessage( &msg ) ;
}
}

How can I do similar thing in .Net application?

Thank you,
Eitan Barazani








Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.