Solved

Define sender as something other than Object?

Posted on 2007-03-18
1
176 Views
Last Modified: 2010-04-23
Can sender be defined as something other than Object? Can it be defined as a particular type of object?
In other words, what options do I have when specifying sender in an event handler?

For earlier related discussion see: http://www.experts-exchange.com/Programming/Languages/.NET/Visual_Basic.NET/Q_22455586.html?cid=239#a18740873
0
Comment
Question by:bobinorlando
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 47

Accepted Solution

by:
Wayne Taylor (webtubbs) earned 500 total points
ID: 18745214
Hi bobinorlando,

If you are writing your own events in a class, you can declare sender as whatever you wish.

If, however you are using an inbuilt control event, it must remain as an Object, and use CType() as Idle_Mind suggested.

Regards,

Wayne
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Since .Net 2.0, Visual Basic has made it easy to create a splash screen and set it via the "Splash Screen" drop down in the Project Properties.  A splash screen set in this manner is automatically created, displayed and closed by the framework itsel…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question