Click here to Skip to main content
16,012,759 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Overlapping screens Pin
Luc Pattyn15-Jun-10 7:26
sitebuilderLuc Pattyn15-Jun-10 7:26 
GeneralRe: Overlapping screens Pin
Wayne Gaylard15-Jun-10 15:45
professionalWayne Gaylard15-Jun-10 15:45 
GeneralRe: Overlapping screens Pin
Luc Pattyn15-Jun-10 16:06
sitebuilderLuc Pattyn15-Jun-10 16:06 
AnswerRe: Overlapping screens Pin
programmervb.netc++15-Jun-10 19:29
programmervb.netc++15-Jun-10 19:29 
QuestionMaskedTextBox -Date Problem() Pin
Paramu197315-Jun-10 5:00
Paramu197315-Jun-10 5:00 
AnswerRe: MaskedTextBox -Date Problem() Pin
Henry Minute15-Jun-10 6:33
Henry Minute15-Jun-10 6:33 
AnswerRe: MaskedTextBox -Date Problem() Pin
Geoff Williams15-Jun-10 7:09
Geoff Williams15-Jun-10 7:09 
AnswerRe: MaskedTextBox -Date Problem() Pin
Luc Pattyn15-Jun-10 8:03
sitebuilderLuc Pattyn15-Jun-10 8:03 
Hi,

I have two comments:

1.
when dealing with dates and times, you should use the relevant classes, and avoid string operations as much as possible. So if the initial date information is in string format, turn it into a DateTime as soon as possible (using TryParse), then take advantage of all the methods and properties DateTime offers.

2.

Paramu1973 wrote:
Dim Dt2 As DateTime = MaskedTextBox1.Text


You should not base your code on those implicit conversions, as they tend to hide potential problems that will bite you sooner or later at run-time. I suggest you start each file with "Option Strict On" (that may generate a couple of surprise messages, each of them needing a fix), then explicitly code the conversions you need (e.g. using DateTime.TryParse). For TextBoxes and other input Controls, be aware they may be empty (hence fail conversion), or contain unacceptable input (even a pretty good MaskedTextBox may accept a "February 31" which will cause havoc later.

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles]

Nil Volentibus Arduum

QuestionComboboxes and commas Pin
Rich Leyshon15-Jun-10 0:04
Rich Leyshon15-Jun-10 0:04 
AnswerRe: Comboboxes and commas Pin
Tom Deketelaere15-Jun-10 0:18
professionalTom Deketelaere15-Jun-10 0:18 
GeneralRe: Comboboxes and commas Pin
Rich Leyshon15-Jun-10 0:36
Rich Leyshon15-Jun-10 0:36 
GeneralRe: Comboboxes and commas Pin
Luc Pattyn15-Jun-10 1:13
sitebuilderLuc Pattyn15-Jun-10 1:13 
GeneralRe: Comboboxes and commas Pin
Rich Leyshon15-Jun-10 1:16
Rich Leyshon15-Jun-10 1:16 
GeneralRe: Comboboxes and commas Pin
Luc Pattyn15-Jun-10 1:42
sitebuilderLuc Pattyn15-Jun-10 1:42 
GeneralRe: Comboboxes and commas Pin
Rich Leyshon15-Jun-10 2:11
Rich Leyshon15-Jun-10 2:11 
GeneralRe: Comboboxes and commas Pin
Luc Pattyn15-Jun-10 2:18
sitebuilderLuc Pattyn15-Jun-10 2:18 
GeneralRe: Comboboxes and commas Pin
Rich Leyshon15-Jun-10 2:26
Rich Leyshon15-Jun-10 2:26 
AnswerUNBELIEVEABLE! Pin
Rich Leyshon15-Jun-10 8:31
Rich Leyshon15-Jun-10 8:31 
GeneralRe: UNBELIEVEABLE! Pin
Luc Pattyn15-Jun-10 9:10
sitebuilderLuc Pattyn15-Jun-10 9:10 
GeneralRe: UNBELIEVEABLE! [modified] Pin
Rich Leyshon15-Jun-10 22:10
Rich Leyshon15-Jun-10 22:10 
GeneralRe: UNBELIEVEABLE! Pin
Luc Pattyn16-Jun-10 1:27
sitebuilderLuc Pattyn16-Jun-10 1:27 
GeneralRe: UNBELIEVEABLE! Pin
Rich Leyshon16-Jun-10 1:54
Rich Leyshon16-Jun-10 1:54 
Generalsolution Pin
Luc Pattyn16-Jun-10 2:20
sitebuilderLuc Pattyn16-Jun-10 2:20 
GeneralRe: solution Pin
Rich Leyshon16-Jun-10 3:42
Rich Leyshon16-Jun-10 3:42 
GeneralRe: solution Pin
Luc Pattyn16-Jun-10 4:00
sitebuilderLuc Pattyn16-Jun-10 4:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.