Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hello
I need a code in C# that will pause a function and run it again to check the database. Could somebody please help me.
thank you

this is confusing. you want to pause the function while in the middle of execution? or you want to run the function periodically?
If you want to run the function periodically, then you can set up a timing thread to call that function at a set time.
If you want to pause the execution of the function, you need to be able to respond to an external event (like a keypress) and then simply loop while the value is set.
i.e.
while(IAmPaused);of course you will need to make certain that this loop can exit and that the application can respond to messages (such as unpausing).
i.e.:
while(IAmPaused)
{
Application.DoEvents();
}Hope this helps,
ChiThey mostly come at night...mostly

![]() |
executing command shortcu...
|
VB - Get IP from DirectPl...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |