splash screen delay

  • Thread starter Thread starter Vanessa
  • Start date Start date
V

Vanessa

how can you slow down a splash screen...i created a bmp
file to use as a splash screen when I open one of my
dbs..and named it the same as the db, and it flashes when
I open the database...but ever so fast...how can I
increase the time to see it?

thanks in advance...
 
Here is a routine I use for my splash forms. The open or viewing time of
the splash form is adjustable.
Creat a module called Splash and paste this into the module. Change the
names as required. In your Startup have the splash form decalred as the
starting form.

Hope this helps,
Henry

'******************************************************************
' MODULE NAME: Splash
' DECLARATION SECTION
'******************************************************************
Option Explicit

Dim gSplashStart ' The time when the splash screen opened.
Dim gSplashInterval ' The minimum time to leave the splash screen
' up.
Dim gSplashForm ' The name of the splash screen form.

'******************************************************************
' FUNCTION: SplashStart()
'
' PURPOSE: Used to invoke the splash screen form specified by the
' SplashForm argument.
'
' ARGUMENTS:
' SplashForm - The name of the form to use as the splash
' screen.
' SplashInterval - The minimum time, in seconds, that the splash
' screen must remain active on the screen.
'
'******************************************************************
Function SplashStart(ByVal SplashForm As String, ByVal _
SplashInterval As Integer)
' Open the splash form.
DoCmd.OpenForm SplashForm ' In Microsoft Access 97 and 7.0.
' Set the starting time.
gSplashStart = Timer

' Record the global information.
gSplashInterval = SplashInterval
gSplashForm = SplashForm
End Function

'******************************************************************
' FUNCTION: SplashEnd()
'
' PURPOSE: Used to close the splash screen form opened by the
' SplashStart() function. This function checks to ensure that
' the splash screen remains active until the user-specified
' interval has expired.
'
'******************************************************************
Function SplashEnd()
Dim RetVal

' Loop until the splash screen has been active for
' the desired interval.
Do Until Timer - gSplashStart > gSplashInterval
' Yield control so other applications can process.
RetVal = DoEvents()
Loop

' Close the splash screen.
DoCmd.Close acForm, gSplashForm ' In Microsoft Access 97 and 7.0.

End Function
'******************************************************************
' MODULE NAME: Splash
' DECLARATION SECTION
'******************************************************************
Option Explicit

Dim gSplashStart ' The time when the splash screen opened.
Dim gSplashInterval ' The minimum time to leave the splash screen
' up.
Dim gSplashForm ' The name of the splash screen form.

'******************************************************************
' FUNCTION: SplashStart()
'
' PURPOSE: Used to invoke the splash screen form specified by the
' SplashForm argument.
'
' ARGUMENTS:
' SplashForm - The name of the form to use as the splash
' screen.
' SplashInterval - The minimum time, in seconds, that the splash
' screen must remain active on the screen.
'
'******************************************************************
Function SplashStart(ByVal SplashForm As String, ByVal _
SplashInterval As Integer)
' Open the splash form.
DoCmd.OpenForm SplashForm ' In Microsoft Access 97 and 7.0.
' Set the starting time.
gSplashStart = Timer

' Record the global information.
gSplashInterval = SplashInterval
gSplashForm = SplashForm
End Function

'******************************************************************
' FUNCTION: SplashEnd()
'
' PURPOSE: Used to close the splash screen form opened by the
' SplashStart() function. This function checks to ensure that
' the splash screen remains active until the user-specified
' interval has expired.
'
'******************************************************************
Function SplashEnd()
Dim RetVal

' Loop until the splash screen has been active for
' the desired interval.
Do Until Timer - gSplashStart > gSplashInterval
' Yield control so other applications can process.
RetVal = DoEvents()
Loop

' Close the splash screen.
DoCmd.Close acForm, gSplashForm ' In Microsoft Access 97 and 7.0.

End Function
 
Sorry, in my previous message I didn't give you the whole story.
In your startup options text box "Display Form/Page" place the name of your
splash form (i.e., frmSplash).
Create the module named "Splash" (without the quotes) and past the code of
my previous message in the module.
The part I forgot: Create a Macro named "AutoExec".
In the autoexec macro Action select "RunCode" and for that first line of
runcode enter the Function Name: SplashStart ( "frmSplash" ,3) [in my case
my splash form is named "frmSplash" and the number 3 represents the number
of seconds I want my splash form to be viewed before it is closed]
In the autoexec macro second line of Action select "RunCode" and for the
second line and enter the Function Name: SplashEnd ().
If you have any autoexec functions that need to run before the splash screen
is displayed put that runcode reference in this macro first. In my case I
have a Function called AutoExec that checks to make sure the back end of my
application is still there and the links are OK. If this link is broken it
provides the operator an opportunity to find the back end, select it and the
application automatically refreshes the links. So my AutoExec macro looks
like this:
RunCode Function Name: AutoExec
RunCode Function Name: SplashStart ( "frmSplash" ,3)
RunCode Function Name: SplashEnd ()

Hope this helps, Write back if you have any questions.
Cheers,
Henry
 
Here is a very simple method to slow down the closing of your splash screen.
On the splash form's properties event tab
"On Timer" event enter macCloseSplash (this is a name of a macro)
"Timer Interval" enter number of milliseconds you want the timer to clock
before it runs the macro named macCloseSplash (4000 equals 4 seconds).
Create a macro named macCloseSplash (or any name you choose)
In the macro "macCloseSplash" Action column select Close.
At the bottom of the macro form:
Object Type: select Form
Object Name: select the name of your splash form ( frmSplash in my case)
Save: select No
Be sure to enter the name of your splash form in the "Startup" dialog too.

Now, when you launch the application Access will open your splash form and
hold it there for as many milliseconds as you want (4000 in my example).
If you want something specific to happen after your splash form closes then
put that action in the form's "On Close" event.

Cheers,
Henry
 
You can't, Vanessa. You have no control over that BMP splash screen. You can
use an Access form as your splash screen, and control the length of time
that form is displayed using the techniques Henry describes elsewhere in
this thread.

I use a BMP splash screen that consists of a single black pixel. No one sees
it (so I don't care how long it is displayed) it just prevents the display
of the default Access splash screen.
 
Back
Top