473,473 Members | 2,039 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

formatting a textbox - question

Hi,

is there a way within vb,net to specify the way that information is entered
into a textbox?

for example a field that requires data to be inputted as DD/MM/YYYY

i know this was possible with VB6 as you could use a masked textbox.

can somebody point me in the right direction?

Many thanks
Simon
Nov 4 '05 #1
3 1420

for that specific example you can best use the datetimepicker in vb.net. you
will only be able to type the format you have set.

"Simon Whale" wrote:
Hi,

is there a way within vb,net to specify the way that information is entered
into a textbox?

for example a field that requires data to be inputted as DD/MM/YYYY

i know this was possible with VB6 as you could use a masked textbox.

can somebody point me in the right direction?

Many thanks
Simon

Nov 4 '05 #2
I think this is what you are looking for (Search for "mask" in help)

Class Name
MaskEdBox

Remarks
The Masked Edit control generally behaves as a standard text box control
with enhancements for optional masked input and formatted output. If you do
not use an input mask, the Masked Edit control behaves much like a standard
text box.
"Simon Whale" wrote:
Hi,

is there a way within vb,net to specify the way that information is entered
into a textbox?

for example a field that requires data to be inputted as DD/MM/YYYY

i know this was possible with VB6 as you could use a masked textbox.

can somebody point me in the right direction?

Many thanks
Simon

Nov 4 '05 #3
You could register an event listener for when the text changes, and take
some action of the entered text doesn't fit a particular format. There are
also the ErrorProvider classes that might help you. Maybe you could use
DateTimePicker instead of a TextBox?

I develop in c# so I'm not sure how those classes work in VB.

"Simon Whale" <si***@noway.ukdatait.com> wrote in message
news:uM*************@TK2MSFTNGP15.phx.gbl...
Hi,

is there a way within vb,net to specify the way that information is
entered into a textbox?

for example a field that requires data to be inputted as DD/MM/YYYY

i know this was possible with VB6 as you could use a masked textbox.

can somebody point me in the right direction?

Many thanks
Simon


----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
Nov 4 '05 #4

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

Similar topics

4
by: cefrancke | last post by:
How does Stephen Lebans make the datasheet row color change by clicking a row's check box field? I cant find any code associated with the form, and I cant tell if you have created a class on the...
1
by: GGerard | last post by:
Hello Is there a way to use a variable in the Conditional Formatting of a Textbox? Example : I want the background of a textbox in a continuous form to change color when the value of...
7
by: BBFrost | last post by:
I'm receiving decimal values from database queries and placing them on a report page. The users want to see the following .... Db Value Display Value 123.3400 123.34...
3
by: trint | last post by:
Ok, I have a textbox that I want to check as one types each charactor for Currency formatting, another one for Date formating. Any help is appreciated. Thanks, Trint
4
by: Jan Nielsen | last post by:
Hi I have a dataform that shows a date from a MSDE 2000 in a textbox. It uses the format: dd-mm-yyyy hh:mm:ss It would it to use the format dd-mm-yyyy But I can't find a Format property for the...
2
by: jodyblau | last post by:
I'm not certain that what I am trying to do is possible; in any event I haven't been able to figure it out. Here is what I am trying to do: I have one table that has a list of cases I'm working...
4
by: Peter Newman | last post by:
the data input app im writing has some 30 + input fields and i want to be able to format them. I know i can use the .validate on each textbox and format the 'string' however this require loads...
2
by: robertng90025 | last post by:
I'm having a problem with MS Access 2003 and its conditional formatting. I have textboxes on a continuous form whose left and right margins are set to 0.03 inches. Based on each textbox's...
1
by: dbuchanan | last post by:
I want to fill a textbox or a label or with lines from a listbox. I want to preserve the lline for line as it comes from the list box. I do not want the test to run-on. I suppose it is okay to wrap...
1
by: Greg (codepug | last post by:
Access 2000 Using a textbox of a single form, I created a calculated field. The following code is in the Control Source for this field: =IIf(=24,+(/),/ ) The numbers that are calculated are...
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
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
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
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
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
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.