Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Showdialog executes but dont show up

Status
Not open for further replies.

TipGiver

Programmer
Sep 1, 2005
1,863
This is the form i want to show as dialog.

Code:
    Private Sub SplashForm_Shown(ByVal sender As Object, ByVal e As System.EventArgs) _
    Handles Me.Shown

        Application.DoEvents()

        If (Me.isSplash = True) Then

            Dim mf As New Global.Dialogs.MainForm

            Dim [stop] As DateTime = DateTime.Now.AddSeconds(5)

            Me.Timer1.Enabled = True

            While ([stop] > DateTime.Now)
                Application.DoEvents()
            End While

            mf.Show()

            Me.Dispose(False)

        End If

    End Sub

NOTE: The above code is in the SplashForm form.

When the SplashForm is Shown then i do a 5sec delay and show the mainform. The SplashForm in the Constructor takes a boolean isSplash (it is both splash and about form).

When the isSplash is true (act like "Splash" Form), everything is ok. When it is false (act like "About" Form), the code in the IF is skipped (because the MainForm is already shown), the SplashForm's .ShowDialog acts like dialog (owner (MainForm) does not have focus), but the SplashForm dont show.

Any ideas?
 
Found it....

Can you believe it? It was the opacity which i forgot to set to 100% (it was 1%)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top