Hello There,
i have form1 and form splash..i used the splash as processing indicator i place gif in the splash form...and in form1 i call the splash in separate thread..
like this..
SplashScreen is another class and had a shared sub ShowSplashScreen()Code:Dim splashthread As Thread = New Thread(New ThreadStart(AddressOf SplashScreen.ShowSplashScreen)) splashthread.IsBackground = True splashthread.Start()
here:
ShowSplashScreen() Method is the actual splash Form classCode:Public Shared Sub ShowSplashScreen() If sf Is Nothing Then sf = New SplashForm sf.ShowSplashScreen() End If End Sub
here it is.
now,my problem is when form1 is loaded and click button process in it..the splash form will not display modally...is it because i called the splash in separate thread?..Code:Public Sub ShowSplashScreen() If InvokeRequired Then ' We're not in the UI thread, so we need to call BeginInvoke BeginInvoke(New SplashShowCloseDelegate(AddressOf ShowSplashScreen)) Return End If Me.ShowDialog() Application.Run(Me) End Sub
please give some advice on this..thank you..




Reply With Quote