Does anyone know how to do this?
Thanks,
Patrick.
If I understand you correctly, what you want to do is expose events.
What you have to do is first define the event handler for your event (what
form the event handler should have anyways), through a delegate. Once you
have this, you can just declare an event of the delegate type. You can do
something like this:
public delegate MyEventHandler(object sender, EventArgs e);
public event MyEventHandler MyEvent;
Then, when you want to fire the event, you do it like this:
// Check to see if the anyone hooked up for the event.
if (MyEvent != null)
// Fire the event.
MyEvent(this, new EventArgs());
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- nicholas...@exisconsulting.com
"Patrick M. Gahan" <patrick...@hotmail.com> wrote in message
news:OPmD#l9VCHA.1496@tkmsftngp11...
private void pctboxImage_MouseUp(object sender,
System.Windows.Forms.MouseEventArgs e)
{
pctboxImage.Image = imglstButtons.Images[0];
this.OnMouseUp(e);
}
This I do it after changing my image to the one I like, for an instance, the
button clicked.
This way I constructed a customizabel button with your own graphics.
If anyone needs this type of custom control, just mail me.
Thanks,
Patrick.
"Nicholas Paldino [.NET/C# MVP]" <nicholas...@exisconsulting.com> wrote
in message news:uOzZ06$VCHA.4012@tkmsftngp08...