RE: Splash as the startup object locks the form



Here's what I did (and it works):
1. In Module1, I added Main() and set it as my startup object:
Public splashFrm As New Splash
Public mainFrm As New MainForm

Sub Main()
splashFrm.Show()
Application.DoEvents()
Application.Run(New mainFrm)
End Sub

2. I removed Splash_Load routine.
3. In MainForm_Load routine, I put this:
....
Me.Show()
splashFrm.Close()
....

"Eve" wrote:

> If I try using a module as your startup object and load the Splash and
> MainForm from there, I get the same results.
>
> Also, this locking problem is not menu specific.
> I noticed that when I load another form from the MainForm not through the
> menu, the OK button in the upper-right hand corner doesn't work either (but
> the buttons on the form work).
>
> I can't even close this task...
>
>
>
> "Eve" wrote:
>
> > I'm trying to use the Splash screen, but I observed a strange behavior. If I
> > specify the SplashForm as my startup object, the MainForm loads fine except
> > it's got a menu and when I click on the menu option (which loads another
> > form, such as About) none of the buttons - OK button in the upper right-hand
> > corner and the buttons on my About form - works. It seems the About form is
> > locked. It works fine if my startup object is MainForm, which I don't want to
> > be the case because launching the SplashForm in MainForm_Load event seems to
> > be slower.
> > I don't know how to explain this behavior...
> >
> > Private Sub Splash_Load(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles MyBase.Load
> > Me.Show() : Application.DoEvents()
> > Dim mainFrm As New MainForm
> > mainFrm.LoadMainForm() 'here I load the grid with data, I want to
> > show the form only after it is loaded
> > Me.Close()
> > mainFrm.ShowDialog()
> > End Sub
.



Relevant Pages

  • RE: Splash as the startup object locks the form
    ... MainForm from there, ... I noticed that when I load another form from the MainForm not through the ... > I'm trying to use the Splash screen, but I observed a strange behavior. ... > specify the SplashForm as my startup object, ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: Strange behaviour (splash form not displaying)
    ... Neil already nailed it by suggesting to refresh the splash form (and or ... after the splash screen has been loaded. ... The splash screen itself would be a better startup object than ...
    (microsoft.public.vb.general.discussion)
  • Re: How to make a splash from is sub main?
    ... but if you use the application framework to define a splash ... you must have the startup object be a form in the project and I have ... to have a sub main as startup object, so I can't use the application ... What code is required to have a splash form appear when your ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Slow load time for built application
    ... You are correct that there is some time required to load the LV ... splash screen, but you need to make sure that the main VI is called ... animation with a timed or while loop while loading the main VI (works ... This is after the run-time engine starts and any libraries ...
    (comp.lang.labview)
  • Re: Problem with Dialog Boxes and Notify Icons
    ... > are being done on the mainform, loading up some objects, etc. ... If you want an independent splash screen showing the progress, ... public shared sub showInstance ...
    (microsoft.public.dotnet.languages.vb)