Solved

Define sender as something other than Object?

Posted on 2007-03-18
1
170 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
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
Parsing a CSV file is a task that we are confronted with regularly, and although there are a vast number of means to do this, as a newbie, the field can be confusing and the tools can seem complex. A simple solution to parsing a customized CSV fi…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now