473,396 Members | 1,866 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Question about Overriders TextBox Controls

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
Nov 20 '05 #1
3 929
* "MenuChen" <an*******@discussions.microsoft.com> scripsit:
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)
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #2
But ,where should I put your code?
In the form or the Overrided TextBox?
-----Original Message-----
* "MenuChen" <an*******@discussions.microsoft.com> scripsit:
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)
///

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
.

Nov 20 '05 #3
* "MenuChen" <an*******@discussions.microsoft.com> scripsit:
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?

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: wASP | last post by:
Hello everyone, I'm new to C# and ASP.NET, so pardon my stupidity on this one. I'm having a problem with referencing methods/functions external to a class member function. My code is as...
8
by: pagates | last post by:
Hello, I am playing a little with Encoding, and I have what is possibly (forgive me) a newbie-type question. I have a function that takes a string and a codepage (based upon the basic MSDN...
2
by: Hazzard | last post by:
I just realized that the code I inherited is using all asp.net server controls (ie. webform controls) and when I try to update textboxes on the client side, I lose the new value of the textbox when...
1
by: Fraggle | last post by:
I have a repeater with controls added at run time. the <template> also contains a <asp:textbox that is made visible on some repeater elements. when I come to read the text info out it has...
6
by: Bill Jones | last post by:
I'm trying to use this.RegisterStartupScript to add some javascript to and aspx page that will run when the page is loaded. Does anyone know if this function only works in the Page_Load function? ...
5
by: rodchar | last post by:
Hey all, Given: strVal1 = array.getvalue(0) Is there a way I can have a variable in place of strVal1 that will point to strVal1. I guess what I'm asking is if there's a way to make a...
2
by: Jamey Bon | last post by:
I am a C# newbie. I am having a tough time with several issues of scope and visibility. In short, why can't I see any of the elements of Form1 (the base form generated by the "Windows...
0
by: asumal | last post by:
Hello I am new to ASP.NET. I am using CreateUserWizard control to register & create a user. I am using Membership API. I have a Cancel button on the second step of CreateUserWizard control...
2
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.