Passing System.EventArgs as parameters
- From: "GatorBait" <MPotok@xxxxxxxxx>
- Date: 24 Aug 2005 14:04:18 -0700
Hi everyone,
I've been using VB.NET for about 6 weeks now and I keep stumbling on a
concept that I hope someone can clear up for me. Each event of a
control has 2 parameters, sender and e....I am not understanding what
the purpose of those parameters are. Can someone clear that up?
Along those lines, I also don't understand how to make a call to a
Click event...what are you supposed to pass in?
In a program that I am working on I need to draw a border around a
panel. I did some research and found some code that will do just that
(sorry if it pastes ugly):
Private Sub PaintBorder(ByVal sender As Object, ByVal e As
System.Windows.Forms.PaintEventArgs)
ControlPaint.DrawBorder(e.Graphics, e.ClipRectangle,
Color.Black, 3, ButtonBorderStyle.Solid, Color.Black, 3,
ButtonBorderStyle.Solid, Color.Black, 3, ButtonBorderStyle.Solid,
Color.Black, 3, ButtonBorderStyle.Solid)
End Sub
How would I call this function if I wanted to paint a border on a panel
called Panel1???
Thank you in advance for any help!
.
- Follow-Ups:
- RE: Passing System.EventArgs as parameters
- From: Dennis
- RE: Passing System.EventArgs as parameters
- From: Dennis
- RE: Passing System.EventArgs as parameters
- Prev by Date: Re: Next iteration in a for loop?
- Next by Date: Re: reporting in vb.net
- Previous by thread: Question about controls
- Next by thread: RE: Passing System.EventArgs as parameters
- Index(es):
Relevant Pages
|