473,507 Members | 12,693 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

TextBox?

Hi all
I want to implement a textbox that includes a fixed string and user can't
change it and just
enter info after that fixed string..how can I implement that textbox??
in my opinion I have to handle KeyDown event..does anyone has better idea??
thx in advance

Nov 17 '05 #1
4 2934
You just need to set the TextBox's "MaxLength" property to limit its length.
The default is 32767.

Carlos Lozano
www.caxconline.net

"perspolis" wrote:
Hi all
I want to implement a textbox that includes a fixed string and user can't
change it and just
enter info after that fixed string..how can I implement that textbox??
in my opinion I have to handle KeyDown event..does anyone has better idea??
thx in advance

Nov 17 '05 #2
I mean I need a textbox that has a fiexd part string ..for example "BOOK"
and user can't change that string but can enter string after that...
"Carlos Lozano" <Ca**********@discussions.microsoft.com> wrote in message
news:C8**********************************@microsof t.com...
You just need to set the TextBox's "MaxLength" property to limit its length. The default is 32767.

Carlos Lozano
www.caxconline.net

"perspolis" wrote:
Hi all
I want to implement a textbox that includes a fixed string and user can't change it and just
enter info after that fixed string..how can I implement that textbox??
in my opinion I have to handle KeyDown event..does anyone has better idea?? thx in advance

Nov 17 '05 #3
You could use two text boxes. One locked and one unlocked. In the unlocked
text box, let the user enter whatever you would like. On the unlocked boxes's
lost focus (or whatever event) update the locked text box as = "your fixed
text" + unlockedtextbox.text

--Brian
Hi all
I want to implement a textbox that includes a fixed string and user
can't
change it and just
enter info after that fixed string..how can I implement that textbox??
in my opinion I have to handle KeyDown event..does anyone has better
idea??
thx in advance


Nov 17 '05 #4
Another way would be to make a user control with a borderless label on the
left docked against a borderless textbox on the right. You could put the
label and textbox on a panel to retain the 3d edges.

Cheers
Doug Forster

"perspolis" <re*****@hotmail.com> wrote in message
news:e$*************@TK2MSFTNGP12.phx.gbl...
Hi all
I want to implement a textbox that includes a fixed string and user can't
change it and just
enter info after that fixed string..how can I implement that textbox??
in my opinion I have to handle KeyDown event..does anyone has better
idea??
thx in advance

Nov 17 '05 #5

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

Similar topics

0
2103
by: Jonas L | last post by:
Hi, I need to create a textbox which acts as a normal textbox but with the following extra requirements: 1) In-focus color, when the textbox gets focus the backcolor property of the textbox...
4
2876
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
0
1799
by: Newasps | last post by:
Hi guys, I have a problem with UpdateCommand Event. In tihs event Ä°'m creating required controls to get that controls' values and also get them. But when I try to get updated values I'm getting the...
7
2093
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
11
4514
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing...
2
19816
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
3
2207
by: Brad Rogers | last post by:
All, Being immersed in vb.net and trying CSharp after almost a year I forgot the differences. I like vb fixing the uppercase/lowercase names and seeming to be more flexible to code entry. ...
0
2386
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
8
36871
by: Marco Pais | last post by:
Hi there. How can I change the background color of a textbox when it gets the focus? I can handle the "Enter" event and do this private void txtDummie_Enter(object sender, EventArgs e) { ...
1
1610
by: Andy B | last post by:
I have this code: protected void EditEventsWizard_NextButtonClick(object sender, WizardNavigationEventArgs e) { //get the values from the DetailsView TextBox StartTime =...
0
7223
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
7110
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
7372
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...
1
5041
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4702
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3191
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
758
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
411
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.