Solved

Define sender as something other than Object?

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
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 …
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

746 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

13 Experts available now in Live!

Get 1:1 Help Now