Solved

Control.Created question

Posted on 2006-11-04
3
154 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
Comment Utility
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

Enabling OSINT in Activity Based Intelligence

Activity based intelligence (ABI) requires access to all available sources of data. Recorded Future allows analysts to observe structured data on the open, deep, and dark web.

Join & Write a Comment

Suggested Solutions

Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

763 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

13 Experts available now in Live!

Get 1:1 Help Now