Hi
My app writes to a db on startup, so I present the user a splash while it is doing this.
I use a sub main in a module as the startup object and then show the splash (frmSplash,show), do my stuff, hide the splash and set it to nothing, and then instantiate the main form like this
dim frmMain as new frmMain
frmMain.ShowDialog
The problem is that some of the time this works fine and some of the time the app just closes. A breakpoint on the next line is hit, and I can set next statement back to frmMain.ShowDialog, but this is no good when the app is built. Some of the time, the app works fine and some of the time it just shuts down.
The shutdown routine works correctly.
Has anyone else encountered this problem. I suppose I could just use frmMain as the startup object, but I don't like doing it this way.
Thanks in advance
Mark
My app writes to a db on startup, so I present the user a splash while it is doing this.
I use a sub main in a module as the startup object and then show the splash (frmSplash,show), do my stuff, hide the splash and set it to nothing, and then instantiate the main form like this
dim frmMain as new frmMain
frmMain.ShowDialog
The problem is that some of the time this works fine and some of the time the app just closes. A breakpoint on the next line is hit, and I can set next statement back to frmMain.ShowDialog, but this is no good when the app is built. Some of the time, the app works fine and some of the time it just shuts down.
The shutdown routine works correctly.
Has anyone else encountered this problem. I suppose I could just use frmMain as the startup object, but I don't like doing it this way.
Thanks in advance
Mark