unknownloser Posted February 18, 2005 Posted February 18, 2005 I have a program that starts running Sub Main in a module. The code in the module tells the program to go to my main menu, frmInstallerIntro. But, when the code executes, frmInstallerIntro flashes on the screen and then the program terminates. Below is the code in my module: Module Module1 Public installerIntro As New frminstallerIntro Sub Main () installerIntro.Show() End Sub End Module If anyone can give me some help with this problem, I'd really appreciate it. Thanks. Quote
Wile Posted February 18, 2005 Posted February 18, 2005 Use ShowDialog() The Show method will show the window, and then continue with the rest of the code in the method that shows. In this case exiting your application. ShowDialog will also show the window, but the method that calls ShowDialog will wait on that line until the window is closed. Quote Nothing is as illusive as 'the last bug'.
Administrators PlausiblyDamp Posted February 18, 2005 Administrators Posted February 18, 2005 Sub Main () installerIntro.Show() Application.Run(installerIntro) End Sub Quote Posting Guidelines FAQ Post Formatting Intellectuals solve problems; geniuses prevent them. -- Albert Einstein
unknownloser Posted February 20, 2005 Author Posted February 20, 2005 Thanks Thanks for the help guys. I'm a little too new to .NET. I've used to working with VB 5. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.