Question about Overriders TextBox Controls

  • Thread starter Thread starter MenuChen
  • Start date Start date
M

MenuChen

First to say,Sorry for my poor English.
I want to make a customerize TextBox Controls for my
Program.This Control must be like this,when I click the
textbox,it can show me the monthCalendar.I know that in VB
there is a similar control called PickupDate can do
this.But this time I want to do it myself.This is my Code:


Private Overrides TextBox_Click....
Dim myCalendar as new windows.system.Forms.monthCalendar
myCalendar.left=me.left
myCalendar.top=me.top+me.height
myCalendar.show
End ...

I use this customerize TextBox in a form,and when I click
it,I found nothing new appear in my form.It means mycode
above doesn't work.
Who can help me?Thanks a lot.

Best Regards. MenuChen
 
* "MenuChen said:
First to say,Sorry for my poor English.
I want to make a customerize TextBox Controls for my
Program.This Control must be like this,when I click the
textbox,it can show me the monthCalendar.I know that in VB
there is a similar control called PickupDate can do
this.But this time I want to do it myself.This is my Code:


Private Overrides TextBox_Click....
Dim myCalendar as new windows.system.Forms.monthCalendar
myCalendar.left=me.left
myCalendar.top=me.top+me.height
myCalendar.show
End ...

I use this customerize TextBox in a form,and when I click
it,I found nothing new appear in my form.It means mycode
above doesn't work.

You will have to add the control to the form's/container's 'Controls'
collection:

\\\
Me.Controls.Add(MyCalendar)
///
 
* "MenuChen said:
But ,where should I put your code?
In the form or the Overrided TextBox?

In the form. What's an "overrided TextBox"? Are you talking about
inherited controls?
 
Back
Top