CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2016
    Posts
    1

    Question Using Events to notify and change a property i.e. button.color

    Good day all

    I have been going through tutorials from youtube and msdn pages to forums explaining events and how they work.

    I have had no luck, so I will be asking a situation specific question and hopefully someone could get through to me, this is hopefully a simple enough example and a problem I need to implement into a project of mine.

    I have always found ways around events since I never fully understood it, but now I have no choice!

    Code:
    public class tcp_sender
        {
    
            //for testing 
            static bool ServerOnline = false;
    
            void THREAD_CheckServer
            {
                ServerOnline = (Ping == success);
            }
    }
    
    tcp_listener
    {
            //button.color = ((ServerOnline) ? Color.Green : Color.Red);
    }

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: Using Events to notify and change a property i.e. button.color

    Where is the event code?

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured