G
Guest
Hello. I would like to write a console application and windows form
application all in one. If there are command line arguments, then I would
treat it as a console app. Otherwise, I would display a form. I'm having
trouble doing this. Any ideas??
Here's what I did so far:
1) Create a new console application
2) In the Main, i use this code, but it only briefly displays the form, then
it goes away. The code looks like this:
Sub Main(ByVal args() As String)
If args.Length = 0 Then
Dim frm As New frmMain
frm.Show()
frm.Focus()
Else
'....
End If
End Sub
Thank you in advance for your response!
Steve
application all in one. If there are command line arguments, then I would
treat it as a console app. Otherwise, I would display a form. I'm having
trouble doing this. Any ideas??
Here's what I did so far:
1) Create a new console application
2) In the Main, i use this code, but it only briefly displays the form, then
it goes away. The code looks like this:
Sub Main(ByVal args() As String)
If args.Length = 0 Then
Dim frm As New frmMain
frm.Show()
frm.Focus()
Else
'....
End If
End Sub
Thank you in advance for your response!
Steve