January 22nd, 2000, 01:55 PM
i have this code. what it does is displays the splash screen, then slides, from the left, the first form over the splash screen, then the splash screen disappears. well, iv "hard coded" the top and left property positions of both the splash screen(frmSplash) and the first form(frmMain) so that, on my screen, the both show up in the middle. the problem is, i cant set the startup position property to center on either of the forms because that messes up the code, they have to be set on 0-manual. what im wanting to do is some how find the the dimensions of the current screen and then do some math so that the forms will show up in the middle of that screen. here is the code for the "form effects"
Option Explicit
Private frmMainLeft As Single
' Splash screen effects
'
' Displays image to size of form regardless of
' screen resolution
' Start wiping in 3 seconds.
Timer1.Interval = 3000
End Sub
Private Sub Timer1_Timer()
Static done_before As Boolean
Dim new_left As Single
' See if this is the first time.
If Not done_before Then
' It's the first time. Start wiping the
' main form over the splash screen.
done_before = True
Timer1.Interval = 25
frmMainLeft = frmMain.Left
frmMain.Left = -frmMain.Width
frmMain.Visible = True
End If
new_left = frmMain.Left + 240
If new_left > frmMainLeft Then
new_left = frmMainLeft
Unload Me
End If
frmMain.Left = new_left
End Sub
if any one could help me, id greatly appreciate it! thanks
Aaron
Option Explicit
Private frmMainLeft As Single
' Splash screen effects
'
' Displays image to size of form regardless of
' screen resolution
' Start wiping in 3 seconds.
Timer1.Interval = 3000
End Sub
Private Sub Timer1_Timer()
Static done_before As Boolean
Dim new_left As Single
' See if this is the first time.
If Not done_before Then
' It's the first time. Start wiping the
' main form over the splash screen.
done_before = True
Timer1.Interval = 25
frmMainLeft = frmMain.Left
frmMain.Left = -frmMain.Width
frmMain.Visible = True
End If
new_left = frmMain.Left + 240
If new_left > frmMainLeft Then
new_left = frmMainLeft
Unload Me
End If
frmMain.Left = new_left
End Sub
if any one could help me, id greatly appreciate it! thanks
Aaron