bramsquad
asked on
Control.Created question
Right now I'm messing around with the DirectX SDK and there is a program in it which it get mouse data. The question I have has nothing to do with DirectX, but with a part of code I dont seem to understand. The function below is called from a delagate.
public void MouseEvent()
{
// This is the Mouse event thread.
// This thread will wait until a
// Mouse event occurrs, and invoke
// the delegate on the main thread to
// grab the current Mouse state and update
// the UI.
while(Created)
{
eventFire.WaitOne(-1, false);
try
{
applicationDevice.Poll();
}
catch(InputException)
{
continue;
}
this.BeginInvoke(new UIDelegate(UpdateUI));
}
}
The part I don't understand is the while(Created). I've done some web searches on it and it's pretty vague. If this function is executed on a different thread so what Control is it referring to? Also, if I were to create a separate mouse class, how would I refer to this control?
Thanks!
public void MouseEvent()
{
// This is the Mouse event thread.
// This thread will wait until a
// Mouse event occurrs, and invoke
// the delegate on the main thread to
// grab the current Mouse state and update
// the UI.
while(Created)
{
eventFire.WaitOne(-1, false);
try
{
applicationDevice.Poll();
}
catch(InputException)
{
continue;
}
this.BeginInvoke(new UIDelegate(UpdateUI));
}
}
The part I don't understand is the while(Created). I've done some web searches on it and it's pretty vague. If this function is executed on a different thread so what Control is it referring to? Also, if I were to create a separate mouse class, how would I refer to this control?
Thanks!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.