Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6855311
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T01:44:33+00:00 2026-05-27T01:44:33+00:00

Heres my sub: Dim onThisTable as String =Name Private Sub skill_mouseHover(ByVal sender As System.Object,

  • 0

Heres my sub:

Dim onThisTable as String ="Name"

Private Sub skill_mouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.MouseHover, button2.MouseHover, panel1.MouseHover, panel2.MouseHover, pbox1.MouseHover
  descriptionLabel.Text = dbClass.getDescription(sender.Text, onThisTable)
End Sub

Now I wish to give onThisTable a different value depending what the user pass over (panel or a pbox or a button) but I cant find what is the correct way to compare what type it is …

Private Sub skill_mouseHover(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles button1.MouseHover, button2.MouseHover, panel1.MouseHover, panel2.MouseHover, pbox1.MouseHover
  if sender is ( a button )
     onThisTable = "Admin"
  else if sender is ( a panel )
     onThisTable = "dbObject"
  else 
     onThisTable ="Name"
  end if

   descriptionLabel.Text = dbClass.getDescription(sender.Text, onThisTable)
End Sub
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T01:44:33+00:00Added an answer on May 27, 2026 at 1:44 am

    You can use the TypeOf keyword as descibed here (link)

        If TypeOf sender Is Button Then
            onThisTable = "Admin"
        ElseIf TypeOf sender Is System.Windows.Forms.Panel Then
            onThisTable = "dbObject"
        Else
            onThisTable = "Name"
        End If
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Here's my Application_OnError event sink in global.asax.vb: Sub Application_OnError(ByVal sender As Object, ByVal e
Here is my code: Dim StartString As String = Private Sub Dim EndString As
Hers the form code: Imports TechSupportData Public Class frmOpenIncidents Private Sub frmOpenIncidents_Load(ByVal sender As
I have the following code : Imports System.Data.OleDb Private Sub getData() Dim connStr As
Hey here is my script: Private Sub UpdateThread() Dim AppDir As String = Application.StartupPath()
Here is the code for the button click event; Protected Sub CompetenciesButton_Click(ByVal sender As
Here is the function: Private Sub LoadEmail() Dim loSession As RDOSession = Nothing Dim
i have : vb code: Private Sub Calculation() Dim txt1 As Decimal txt1 =
So, let's say I have this code (VB.Net): Sub Main() dim xxx as string
Sub Divide() Dim fPath As String Dim fName As String Dim wb As Workbook

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.