Splash Screen Code

Joe8915

Registered User.
Local time
Today, 06:11
Joined
Sep 9, 2002
Messages
820
I need to add another lbl to the following code. Just where to I add the other lbl. I pick this code up somewhere. The code works great. But all I would like to do is add another lbl to the Splash Screen.

Option Compare Database

Dim intEndingRed As Integer
Dim intEndingGreen As Integer
Dim intEndingBlue As Integer
Dim intIncrementRed As Integer
Dim intIncrementGreen As Integer
Dim intIncrementBlue As Integer
Dim sngRemainingDiffRed As Single
Dim sngRemainingDiffGreen As Single
Dim sngRemainingDiffBlue As Single




Private Sub Form_Activate()
'* 4370509 is a shade of green
'* 13883752 is a shade of cyan
bcg_SetColors Me, 14977294, 14098070
End Sub

Private Sub Form_Deactivate()
bcg_SetColors Me, -2147483645, -2147483620
End Sub

Private Sub Form_Load()
Me.lbl1.Width = 0
Me.Image1.Width = 0
DoCmd.Restore
End Sub

Private Sub Form_Open(Cancel As Integer)
'PlaySound ("V:\Contracts\welworld")

End Sub

Private Sub Form_Timer()

If Me.lbl1.Width = 6000 Then
' I think this is where it should go,
GoTo ImageExpand
Else
Me.lbl1.Width = Me.lbl1.Width + 100
Me.Repaint
Exit Sub
End If


ImageExpand:

If Me.Image1.Width = 4000 Then
Exit Sub
Else
Me.Image1.Width = Me.Image1.Width + 100
Me.Repaint
End If


If Me.Image1.Width = 4000 Then
Me.lbl2.Visible = True
End If

End Sub

Private Sub lbl1_Click()

End Sub

Private Sub lbl2_Click()
MsgBox "Close this splash screen and take user somewhere else."
DoCmd.Close
End Sub
Private Sub Command13_Click()
On Error GoTo Err_Command13_Click

Dim stDocName As String

stDocName = "MacOpenSwitchboard"
DoCmd.RunMacro stDocName

Exit_Command13_Click:
Exit Sub

Err_Command13_Click:
MsgBox Err.Description
Resume Exit_Command13_Click

End Sub
 
I did get the other label to work. Now I wanted to add another label, but I can't get this label (lbl376) even to appear on the form. I am sure its the way the code it written. I am not the greatest at writing code as you can see. An you give me idea on where I am going wrong. The additional label is "lbl376"

Private Sub Form_Timer()

If Me.lbl1.Width = 6000 Then
GoTo ImageExpand
Else
Me.lbl1.Width = Me.lbl1.Width + 100
Me.Repaint
Exit Sub
End If


ImageExpand:

If Me.Image1.Width = 4000 Then
Exit Sub
Else
Me.Image1.Width = Me.Image1.Width + 100
Me.Repaint
End If


If Me.Image1.Width = 4000 Then
Me.lbl2.Visible = True
End If
If Me.Lbl375.Width = 6000 Then
GoTo ImageExpand
Else
Me.Lbl375.Width = Me.Lbl375.Width + 100
Me.Repaint
Exit Sub
End If
If Me.Lbl376.Width = 6000 Then
GoTo ImageExpand
Else
Me.Lbl376.Width = Me.Lbl376.Width + 100
Me.Repaint
' Exit Sub
End If

End Sub
 

Users who are viewing this thread

Back
Top Bottom