Hi guy's,
I have a question.
I'm creating an app, with a splashscreen, loginform (just enter a name) and a mainform.
With I use my.settings.
Now here comes the issue I run into.
The splashscreen should check (onload) if the my.settings.user contains any info, if it does, the mainform should be shown, if not the loginform should be shown. On my app settings I have splashscreen set to the splashscreen and the first form is set to login form.
No on the onload event of the splashscreen I have the following code:
The my.settings.user contains a name, but still the loginform is shown.
When I use the code (above) in the onload event of the loginform, the mainform is loaded after the splashscreen, but just as the mainform is shown, the loginform pops up.
What do I do wrong?
I have a question.
I'm creating an app, with a splashscreen, loginform (just enter a name) and a mainform.
With I use my.settings.
Now here comes the issue I run into.
The splashscreen should check (onload) if the my.settings.user contains any info, if it does, the mainform should be shown, if not the loginform should be shown. On my app settings I have splashscreen set to the splashscreen and the first form is set to login form.
No on the onload event of the splashscreen I have the following code:
VB.NET:
If My.Settings.User > "" Then
Dim mainform As New Form1
mainform.Show()
Me.Hide()
Else
'show login form
End If
The my.settings.user contains a name, but still the loginform is shown.
When I use the code (above) in the onload event of the loginform, the mainform is loaded after the splashscreen, but just as the mainform is shown, the loginform pops up.
What do I do wrong?