|
-
Mar 3rd, 2003, 12:09 PM
#1
Thread Starter
Member
Splash Screen
I am creating a splash screen. After a second i want to put text on it. After another second add some more. Anyone know how to do this?
-
Mar 3rd, 2003, 12:46 PM
#2
-
Mar 3rd, 2003, 01:33 PM
#3
Thread Starter
Member
Yes i use a timer, but i can't figure out the IF statement to use.
-
Mar 3rd, 2003, 04:28 PM
#4
Frenzied Member
Since i have no idea what you're doing exactly, i'll give you a general (ie: Basic) idea. You can reformulate as needed.
This code is for inside the Timer:
VB Code:
IF iWhatPass = 1 then
lblText1.text = "first time around"
elseif iWhatPass = 2 then
lblText2.text = "2nd time"
elseif iWhatPass = 3 then
lblText3.text = "third pass"
Timer1.interval = 0
end if
iWhatPass +=1
Above code relies on the fact you have declared this globally: dim iWhatPass as integer =0
~Peter

-
Mar 5th, 2003, 10:26 PM
#5
Lively Member
How to get a splash screen?
hello, I'm wondering how to get a splash screen ? Can anyone tell me? I looking for this object for long time.
-
Mar 5th, 2003, 10:51 PM
#6
PowerPoster
A splash screen isn't something you purchase at a gas station..
You simply create your splash screens using the classes within the FCL (framework class library).
-
Mar 5th, 2003, 10:58 PM
#7
cant you just use a borderless form? (essentially thats all a splashscreen was in VB6)
btw rafiki47 ...I like your av I created that one 2+ years ago!
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Mar 5th, 2003, 11:30 PM
#8
ok..it works...
but..heres a few tips:
to load Form1
Dim frm as New Form1 'or whatever your next form will be
frm.Show
You cant close the splashscreen form w/o closing all forms (since the following forms are "owned" by the splashscreen)
so.. me.Close() will close all...
so in the next form...(or the "exit" call)
Application.Exit seems to work
I called it in the Form1_Closing sub...
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
-
Mar 6th, 2003, 08:44 AM
#9
Thread Starter
Member
OK.
So lets see if we can work through this. I created a startup module. here is the code in it.
Public Sub Main()
' Create new splash/Main Forms
Dim frmNewSplash As New frmSplash()
Dim frmNewMain As New frmMain()
' SHOW Splash Screen
frmNewSplash.ShowDialog()
'Now show main form
frmNewMain.ShowDialog()
End Sub
----------------------------------------------------------------------------------
Here is the code in the splash screen for the Tick event.
Private Sub tmrSplash_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles tmrSplash.Tick
Me.Close()
End Sub
-----------------------------------------------------------------------------------
Here is an Example of what i am doing.....
Private Sub frmSplash_Paint(ByVal sender As Object, ByVal e As System.Windows.Forms.PaintEventArgs) Handles MyBase.Paint
Dim graCurrent As Graphics = e.Graphics
Dim recCurrent As Rectangle, colCurrent As Color
Dim sbCurrent As SolidBrush, penCurrent As Pen
' Create a rectangle the same size as the form and color it white
recCurrent = New Rectangle(0, 0, Me.Width, Me.Height)
sbCurrent = New SolidBrush(Color.White)
graCurrent.FillRectangle(sbCurrent, recCurrent)
End Sub
---------------------------------------------------------------------------------
Now what i am trying to accomplish .
The tick event is set in the properties to 5 seconds. At one second i would like to draw a line. At two seconds do something else. And so on. Could anyone help?
Thanks
-
Mar 6th, 2003, 10:19 AM
#10
Frenzied Member
Lethal, Mobile is going to begin giving away splash screens with a purchase of 10 gallons or more...
-
Mar 6th, 2003, 10:36 AM
#11
-
Mar 6th, 2003, 10:39 AM
#12
Thread Starter
Member
Thanks,
The posts are very helpful.
-
Mar 7th, 2003, 02:53 PM
#13
Thread Starter
Member
-
Mar 7th, 2003, 03:08 PM
#14
Simple version of what your asking
Timer interval is set to 1000 (1 sec)
VB Code:
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static x As Integer
If x = 1 Then
Label1.Text = "Loading."
End If
If x = 2 Then
Label1.Text = "Loading.."
End If
If x = 3 Then
Label1.Text = "Loading..."
End If
If x = 4 Then
Label1.Text = "Loading...Form1"
End If
If x = 5 Then
Dim frm As New Form1
frmSplash.ActiveForm.Hide()
frm.Show()
End If
x += 1
End Sub
JPnyc rocks!! (Just ask him!)
If u have your answer please go to the thread tools and click "Mark Thread Resolved"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|