Unanswered Usercontrol Event

  • Thursday, April 12, 2012 2:31 AM
     
     

    Now the OnPaint override no longer a problem, or at lease don't care about it, my custom control work just fine as Usercontrol !

    The bigger problem I'm facing now is the Event's !

    Created a property for my control called publink bool Checked, on mouse click I check if true or false and load the appropriate image to paint, what I want is to trigger a event if the Checked state set or cleared in the code, like c_checkBox1.Checked = false;, right now  I can use pooling to check the Checked is tru or false but cant find any way to add my own Event to the Usercontrol !

All Replies

  • Thursday, April 12, 2012 5:41 AM
     
     

    Hi,

    Please follow this sample. It may not exactly suit for your requirement but In this sample they have defined as delegate.

    http://www.codeproject.com/Articles/24048/Implementing-a-smoothly-animated-ListBox


    -Malleswar

  • Saturday, April 14, 2012 12:51 AM
     
     

    Ahhh, I don't see my solution in that article.. Let me try to explain what I want. Let say I create a UserControl, normal event's like Clicked/MouseUP/MouseDown will work fine, but if lets say have an integer int that control and if the value of that integer set by the main program to a specific value than a event will trigger. Now hot to achieve that !?

  • Friday, April 20, 2012 3:07 AM
     
     

    Im sorry but Marshall's and Delegate's are Chine's to me, can some one create and example so I could understand how it works ?

    Let say I have a control and inside this control a  value change from 0-100 based on unimportant factors, I would like to trigger a even every time the value change. How ?

    Thanks

  • Saturday, April 21, 2012 3:29 AM
     
     
    I really need some help here