Hey all, having an interesting time understanding this custom button class I
am making. Here is a section of the code:
protected override void OnMouseEnter(EventArgs e)
{
base.OnMouseEnter(e);
if (pulsingStart == false)
{
pulsingStart = true;
}
}
protected override void OnMouseLeave(EventArgs e)
{
base.OnMouseLeave(e);
StopPulsing();
}
protected override void OnMouseMove(MouseEventArgs e)
{
base.OnMouseMove(e);
if (pulsingStart == true)
{
pulsingStart = false;
StartPulsing();
Invalidate();
Update();
}
}
This works perfectly... but only after I click on the button!! It's like I
have to "activate" the control by clicking on it for this functionality to
work properly. I want this button to pulse when the mouse rolls over it,
regardless of whether or not the user has clicked it yet. There will be many
of these buttons on the stage, and they should all function the same; when
the user's mouse rolls over them, they pulse, and when they roll off, it
stops.
Thanks so much in advance.