This is in part two of my other post for an opinion on using a panel for a splash screen. I opted to not use the panel but I tried adding a Form2 to use instead.
Form1 is my main program, I have added a Form2 and placed this code below in it. I have changed the startup object to Form2 and I can get it to load before Form1 correctly so I can use Form2 as my splash screen.
My trouble is that when I push the button on Form2 to close it and show Form1 "My main program" it closes the Form2 but doesn't bring up my Form1 "main program" as it should.Code:Public Class Form2 Inherits System.Windows.Forms.Form + Windows Form Designer Generated Code <STAThread()> Shared Sub Main() Dim frm1 As Form1 frm1 = New Form1() Application.Run(frm1) End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Me.Close End Sub
Any other thoughts on what's wrong? Knowing me it's something simple or just my lack of knowledge.
P. S. Pirate, I liked your splash screen but for some reason it didn't work when I tried to impliment it with my program.




Reply With Quote