Solved

Control.Created question

Posted on 2006-11-04
3
155 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now