MaskedTextBox VS TextBox

sulistyanto

Member
Joined
Jun 19, 2006
Messages
8
Programming Experience
Beginner
what the different between maskedtexbox and textbox?when i want to make view data with contents time,why the data content date?but i see in MS Access is time contents.
 
The MaskedTextBox is useful to display, but more importantly to accept, text in a very specific format, like a telephone number.

The .NET Framework includes two time-related types: DateTime and TimeSpan. The DateTime represents an instant in time as denoted by a date and time, while the TimeSpan represents a period of time. If you want to specify a time of the day you would normally use a DateTime object and simply ignore the date part, which is what MS Access does. For instance, you can get the current time like this:
VB.NET:
MessageBox.Show("The current time is " & Date.Now.ToLongTimeString())
Note that in VB the Date type and the DateTime type are the same thing. They are simply the VB type and the .NET type, just like Integer and Int32.
 
Back
Top