if you want to do something in paint when leave event fire then
use
Invalidate() method and a flag which will tell your paint event now, leave event regarding if-else block should be run or not.
boolean flag = false;
Leave event ...
{
flag = true;
Mycontrol1.Invalidate(); // it will fire paint event of Mycontrol1
}
MyControl1 paint event ...
{
if (flag==true)
{
//draw something
flag = false;
}
}
Happy coding!
:)