scottsanpedro
Member
- Joined
- Jan 24, 2009
- Messages
- 21
- Programming Experience
- 1-3
Hi,
I'm just starting to look at Custom Controls after watching a MS video online.
Video Training - WindowsClient.net
I wondered if it's possible to get the name of the control that calls the OnEnter event that I am running.
I wanted to add a new combobox to the form and it always call this GetComboList each time OnEnter BUT I need to pass the combobox that the onEnter is firing from. Would save code and give me an insight into how custom controls work.
Thanks in advance
Scott
I'm just starting to look at Custom Controls after watching a MS video online.
Video Training - WindowsClient.net
I wondered if it's possible to get the name of the control that calls the OnEnter event that I am running.
VB.NET:
Public Class MyComboBoxAuto
Inherits System.Windows.Forms.ComboBox
Protected Overrides Sub OnEnter(ByVal e As System.EventArgs)
Try
clsComboBoxes.GetComboList(????????)
Catch ex As Exception
MessageBox.Show("error found." & vbCrLf & ex.Message, clsGeneral.ConTitle, MessageBoxButtons.OK, MessageBoxIcon.Error)
End Try
MyBase.OnEnter(e)
End Sub
End Class
I wanted to add a new combobox to the form and it always call this GetComboList each time OnEnter BUT I need to pass the combobox that the onEnter is firing from. Would save code and give me an insight into how custom controls work.
Thanks in advance
Scott