Drstein99 Posted October 8, 2003 Posted October 8, 2003 I'm writing a program with a listbox. Sometimes the program will change the selected index of the list box by call of another function, or the user can change the selected listbox. the event is: Private Sub lbNextPage_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles lbNextPage.SelectedIndexChanged What is the "sender" object, and how can I tell if it was a mouse-click, or other event telling this function to execute? Quote www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
*Experts* Volte Posted October 8, 2003 *Experts* Posted October 8, 2003 Try this:If sender Is lbNextPage Then 'do whatever End If Quote
Drstein99 Posted October 8, 2003 Author Posted October 8, 2003 looks like sender is always lbnextpage, no matter if another function changes the selected value or the user changes via mouse click. I need to differentiate between the two. Quote www.DRSTEIN99.com www.RAIDGEAR.net www.THERE.com -> Tell them DrStein99 sent ya!
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.