Solved

Define sender as something other than Object?

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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.Net - KeyPress Event 4 38
VB.NET (2008) - Refactoring Question 2 23
Write to a printer using vb.net 9 38
SSRS 2016 Rendering HTML tables 3 26
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
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 …
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

809 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