Im using C# to start on a Particle Editor for school, but I forgot how to stop waiting on events.
I know you at least need to do this, which i've done, but i can't remember what else I was supposed to do somewhere else. Anyone else know?
// Inherit from Panel
class graphics_panel : Panel
{
public graphics_panel()
{
DoubleBuffered = true;
}
}
Im using C# to start on a Particle Editor for school, but I forgot how to stop waiting on events.
I know you at least need to do this, which i've done, but i can't remember what else I was supposed to do somewhere else. Anyone else know?
// Inherit from Panel
class graphics_panel : Panel
{
public graphics_panel()
{
DoubleBuffered = true;
}
}
Check the value of DoubleBuffered, and if it's true, start the relevant code, is what comes to mind.
well by default c# waits on an event to happen like "GetMessage()" in Windows. I want it to run like "PeekMessage". I just don't remember where to change that, i know it wasn't that buffer check though. Thanks anyways =)
well by default c# waits on an event to happen like "GetMessage()" in Windows. I want it to run like "PeekMessage". I just don't remember where to change that, i know it wasn't that buffer check though. Thanks anyways =)
Ah - You're probably looking for an EventHandler, then.
There are several ways to do what you want. In order to not wait for messages at all, you must change Application.Run(new YourForm()); in Program.cs (default location of that line). An easier solution would be to just add a timer and call Refresh() or yourPanel.Refresh() on its Tick event.