Solved

Control.Created question

Posted on 2006-11-04
3
157 Views
Last Modified: 2010-04-16
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!
0
Comment
Question by:bramsquad
3 Comments
 
LVL 48

Accepted Solution

by:
AlexFM earned 500 total points
ID: 17875904
Created property belongs to class where MouseEvent function is placed. If this is Control-derived class, this is Control.Created property. While loops continues pooling while control exists, and exits when control is destroyed.
0

Featured Post

Does Powershell have you tied up in knots?

Managing Active Directory does not always have to be complicated.  If you are spending more time trying instead of doing, then it's time to look at something else. For nearly 20 years, AD admins around the world have used one tool for day-to-day AD management: Hyena. Discover why

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error in JQuery 5 52
C#  Radio button search for Date not DateTime 4 46
Device Location 4 29
2 questions 10 25
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
This article aims to explain the working of CircularLogArchiver. This tool was designed to solve the buildup of log file in cases where systems do not support circular logging or where circular logging is not enabled
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

770 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question