Click here to Skip to main content
16,005,389 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: shape drawing and coordinations Pin
DaveAuld15-May-10 6:42
professionalDaveAuld15-May-10 6:42 
GeneralRe: shape drawing and coordinations Pin
tuolesi15-May-10 7:03
tuolesi15-May-10 7:03 
GeneralRe: shape drawing and coordinations Pin
tuolesi17-May-10 5:25
tuolesi17-May-10 5:25 
AnswerRe: shape drawing and coordinations Pin
Luc Pattyn15-May-10 6:39
sitebuilderLuc Pattyn15-May-10 6:39 
QuestionAxDtPicker problems oleDate is invalid [modified] Pin
QuickBooksDev15-May-10 4:20
QuickBooksDev15-May-10 4:20 
AnswerRe: AxDtPickter problems oleDate is invalid Pin
Johan Hakkesteegt17-May-10 2:36
Johan Hakkesteegt17-May-10 2:36 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
QuickBooksDev17-May-10 8:35
QuickBooksDev17-May-10 8:35 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
Johan Hakkesteegt17-May-10 22:07
Johan Hakkesteegt17-May-10 22:07 
Everything you have told me so far (also in your additional post), makes me suspect something. In old VB6 cross form actions were simple, but .NET uses threads in a totally different way. Am I correct in my suspicion that the Ss string has been declared in either form's code ? If so, you could try the Global module method. In other words, add a module to your project and move the Ss string (and all other similar ones) here, and remember to make it Public.

Also, again, as this error only happens some of the time, I suggest that you put your code in a Try Catch block, with MsgBox(Ss) in the Catch. Then try to recreate the problem by testing with ambiguous dates like for example 10/13/2009. And, again, look into cultureinfo, it will solve a lot of headaches with things like PM and AM and such. This link[^] will come in handy.

Another method to ensure correct values, which takes a little more coding, is to use the dtpFromLastTime.Value.Day / .Month / .Year / .Minutes / .etc properties. With these you can more securely parse the date into the string for your settings.

As for the time issue, I seem to remember having had similar problems once. I found that adding a date (any date) solved it all, as sometimes, for reasons unknown to me, a string like "00:00:00" will get parsed into an impossible date instead of into a time.

Finally, if you need to save settings in a Windows forms app, I warmly suggest to switch to .NET's built in settings handling. They are laughably easy to use (see this article[^] on how easy. Added bonus, you can actually save dates, fonts, colors, and pretty much all other types, instead of only strings.
My advice is free, and you may get what you paid for.

GeneralRe: AxDtPickter problems oleDate is invalid Pin
QuickBooksDev19-May-10 7:11
QuickBooksDev19-May-10 7:11 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
Johan Hakkesteegt19-May-10 22:47
Johan Hakkesteegt19-May-10 22:47 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
QuickBooksDev20-May-10 0:56
QuickBooksDev20-May-10 0:56 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
Johan Hakkesteegt20-May-10 1:07
Johan Hakkesteegt20-May-10 1:07 
GeneralRe: AxDtPickter problems oleDate is invalid Pin
QuickBooksDev20-May-10 3:33
QuickBooksDev20-May-10 3:33 
AnswerRe: AxDtPicker problems oleDate is invalid Pin
QuickBooksDev17-May-10 9:45
QuickBooksDev17-May-10 9:45 
GeneralRe: AxDtPicker problems oleDate is invalid [modified] Pin
QuickBooksDev19-May-10 10:51
QuickBooksDev19-May-10 10:51 
GeneralRe: AxDtPicker problems oleDate is invalid Pin
QuickBooksDev20-May-10 1:57
QuickBooksDev20-May-10 1:57 
GeneralRe: AxDtPicker problems oleDate is invalid Pin
QuickBooksDev20-May-10 3:51
QuickBooksDev20-May-10 3:51 
GeneralRe: AxDtPicker problems oleDate is invalid Pin
QuickBooksDev21-May-10 0:48
QuickBooksDev21-May-10 0:48 
Questionquery .db databases Pin
Jack_1815-May-10 2:01
Jack_1815-May-10 2:01 
AnswerRe: query .db databases Pin
DaveAuld15-May-10 3:13
professionalDaveAuld15-May-10 3:13 
AnswerRe: query .db databases Pin
DaveAuld15-May-10 3:17
professionalDaveAuld15-May-10 3:17 
GeneralRe: query .db databases Pin
Jack_1815-May-10 8:20
Jack_1815-May-10 8:20 
GeneralRe: query .db databases Pin
DaveAuld15-May-10 8:22
professionalDaveAuld15-May-10 8:22 
GeneralRe: query .db databases Pin
Jack_1815-May-10 8:29
Jack_1815-May-10 8:29 
AnswerRe: query .db databases Pin
loyal ginger15-May-10 11:04
loyal ginger15-May-10 11:04 

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.