That's exactly what I needed. Thanks Ken!
Private Sub nPnlProfile_MouseHovers(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles comboProfileName.MouseHover,
btnDelete.MouseHover, btneditFolderPath.MouseHover,
comboThumbQuality.MouseHover, comboThumbSize.MouseHover,
btnAddFile.MouseHover, btnRemove.MouseHover, listFileTypes.MouseHover
If sender Is comboProfileName Then nPnlProfile.FooterText = "Select an
existing name from the drop down list or input a new profile name then hit
ENTER"
If sender Is btnDelete Then nPnlProfile.FooterText = "Select this button to
delete the currently selected profile"
If sender Is btneditFolderPath Then nPnlProfile.FooterText = "Select the
folder path your templates"
If sender Is comboThumbQuality Then nPnlProfile.FooterText = "Select the
compression quality for your thumbnails"
If sender Is comboThumbSize Then nPnlProfile.FooterText = "Select the size
you wish your thumbnails to be"
If sender Is btnAddFile Then nPnlProfile.FooterText = "Add a file mask to
the search paramters"
If sender Is listFileTypes Then nPnlProfile.FooterText = "This area will
show you the file types the currently selected profile will search for"
If sender Is btnRemove Then nPnlProfile.FooterText = "Select a file type
then select remove to remove that file type from the list"
.........
End Sub
[quoted text, click to view] "Ken Tucker [MVP]" <vb2ae@bellsouth.net> wrote in message
news:ON1AobPVFHA.544@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> Sender is the control which fired the event.
>
> If sender is listbox1 then
> 'do something
> elseif sender is comboprofilename then
> 'do something else
> .....etc
>
> Ken
> ----------------
> "Justin" <Justin@NoSpam.com> wrote in message
> news:OXCrbFPVFHA.2128@TK2MSFTNGP15.phx.gbl...
> Take this example:
>
> Private Sub nPnlProfile_MouseHovers(ByVal sender As System.Object, ByVal e
> As System.EventArgs) Handles comboProfileName.MouseHover,
> btnDelete.MouseHover, btneditFolderPath.MouseHover,
> comboThumbQuality.MouseHover, comboThumbSize.MouseHover,
> btnAddFile.MouseHover, ListBox1.MouseHover, btnRemove.MouseHover
>
> 'Do Something
>
> End Sub
>
> Is there a way to detect which control is firing so I can run code for
> that
> control.mousehover? I figured that would be better then having a hundred
> some subs.
>
> Is this an appropriate way to code?
>
> Thanks,
> Justin
>
>
>