G
Guest
For example, I create Login form first. When user login, it open the main
form and close the login form itself.
form and close the login form itself.
Alex said:For example, I create Login form first. When user login, it open the main
form and close the login form itself.
Dennis said:Why does the following slightly modified code cause an exception to be
thrown
on the Application.Run Line?
Public Module Program
Public Sub Main()
Dim f As New Form1()
f.Show()
Application.Run()
End Sub
End Module
In Form1 button 'Click' event handler:
Dim f2 As New Form2()
f2.ShowDialog() Note after return from this Dialog, an exception is
thrown.
\\\
Public Module Program
Public Sub Main()
Dim f As New Form1()
f.Show()
Application.Run()
End Sub
End Module
///
Cor Ligthert said:What is the deeper reason that you use this code forever.
(This is a serious question)
Saying it in otherwords what is in your opinion the advantage above the
build VBNet method in a windowform project.
Cor Ligthert said:The only argument I read here is the aspect of clossing the mainform,
where I see no reasons for, but I will not tell direct I disagree about
that.
However than has the main really to be the main of the project and than
should there not be any form call from another place in my opinion. I
think that any tree structure inside a form node than is not right.
The application is started.
'Form1' is shown.
'Form1' is closed.
'Form2' is shown.
'Form2' is closed.
...
The application terminates.
Dennis said:Anyway, I'll live with out VisualStyles for
now until I get time to see exactly what's casuing the error.
Sub Main
Application.EnableVisualStyles
\\\
Application.DoEvents()
///
Form1.Show
Application.Run()
end Sub
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.