PDA

View Full Version : Solved: Make Splash Screen enabled longer?



skaseman
06-01-2005, 10:42 AM
I've noticed that the Access DB program splash screen processes so quickly that you cannot grasp what appears on the image :banghead: . However, my security software program has a splash screen that stays on almost too long. I've researched a couple of VBA books that tell me HOW to make a splash screen, but none seem to tell you anything about adjusting the amount of time that it is displayed.

Can anyone give us a splash screen time setting lesson?

xCav8r
06-01-2005, 11:21 AM
Use the timer function. :)

skaseman
06-01-2005, 11:24 AM
ok - but where do you need to put the timer function? You would want the splash screen to show up when Access is "double clicked", so do you need to make a form in the start up window? Or is there a way to actually adjust the code on the splash screen itself?

skaseman
06-01-2005, 11:59 AM
I'm thinking that I have to make something a little "untraditional". There are startup properties in ACCESS where I can define what form I want opened at startup. If I insert my splash screen (bmp file) as an image on a form and call it "splash form", maybe I could write :dunno code under "form load" that uses the timer function, closes this form, and opens my switchboard form.

Do you think that might work?

xCav8r
06-01-2005, 12:51 PM
Yup, that'll work.

skaseman
06-01-2005, 01:26 PM
I think I've got it now. I'll consider this case "solved". But, if I have trouble...I'll be back! You know, it's important to give yourself credit if you do a good job creating software. I'm a firm believer in "free advertising"; that's why this splash screen is so important to me. :friends:

xCav8r
06-01-2005, 07:39 PM
Alright, let's see the splash screen. ;)

skaseman
06-02-2005, 06:03 AM
Problem!!! Problem!!!!:help

I set up the startup properties to open the form "SplashScreen". Then I run a 4 sec. pause procedure. What seems to be happening is that the pause procedure comes before opening the form.

So, I tried running the pause procedure in the "open form" code for the form "SplashScreen". After the pause procedure, I have a message box to indicate that the pause procedure has finished. This message box appears before the Splash Screen opens. I'm very confused!!!!!!

xCav8r
06-02-2005, 06:19 AM
Sorry, my fault for not having been clearer. I should have said use the timer event with a timer interval. Example:


Private Sub Form_Timer()
DoCmd.Close
DoCmd.OpenForm "frmSwitchboard"
End Sub


The interval is set up on the event tab of the form properties dialog box.

skaseman
06-02-2005, 07:19 AM
Oh! I'll give it a try during my "morning break" at work. I'm still indecisive over which event the interval needs to go on. I'm also wondering about where the above mentioned code is called. I'm thinking that I need to call the interval event "on open" and then the last line of the code would be to run the "Form_Timer" procedure...is that what you're instructing me to do?

xCav8r
06-02-2005, 07:43 AM
Open up the properties dialog box for the splash form. Go to the events tab. Look for "On Timer" and "Timer Interval". Create your event procedure from here. You won't need to do anything else. It will automatically run the On Timer event when the form opens.

skaseman
06-02-2005, 07:47 AM
Here's where the frustration becomes apparent, huh? From what I've read about this timer interval is that the process would then keep running every "time intervals" specified. We only want this to occur 1 time or when the form is opened.

skaseman
06-02-2005, 07:50 AM
PS, Will this time interval run just one time, every time the form is opened?

skaseman
06-02-2005, 08:02 AM
I sure like to post alot, don't I?

Thank you very much! The clouds have lifted and my splash screen shines through them! The answer to the PS is yes! I got it (I don't know how much more obvious you could have been, but I was a little bit worried about using those events; on timer and time interval.) I guess in the programming world, sometimes you just have to do it to see how it works!

xCav8r
06-02-2005, 08:02 AM
If the procedure closes the form, then the timer stops. So, yes, it will only run one time.

GaryB
06-03-2005, 12:05 PM
Hi,

Just curious,

wouldn't this work using the timer interval in properties "all" and then creating an event in "on close" to open the next form. And then set the splashscreen form as the form to open in Tools/startup?

Gary

skaseman
06-03-2005, 12:12 PM
Hmmm...good point. I'll try it out over the week end. It's always great to learn new ways to do something! Thanks! :)

xCav8r
06-03-2005, 10:17 PM
wouldn't this work using the timer interval in properties "all" and then creating an event in "on close" to open the next form. And then set the splashscreen form as the form to open in Tools/startup?

I could be mistaken, but I think you mean by "using the timer interval in properties 'all'" to say "on the event tab of the properties for the form that wil be the splash screen", ie., the window you get when the form is selected and you hit ALT+ENTER. If this is the case, this is exactly what I had meant for skaseman to do when I posted the Form_Timer snippet above: startup form = splash whose timer procedure opens the switchboard when the splash screen closes.

You could, of course, make the form_timer procedure call the form_close procedure in which you could place code to open the switchboard, but it's difficult for me to see an advantage to that in cases where the splash screen is displayed only when the application is opened. In other circumstances, however, I grant it could be useful.

GaryB
06-06-2005, 08:37 AM
Pretty much the same thing.. It's just all sitting there in the properties menu of the form and seemed a simple way to go about it. The only other thing that has to be done is to add a statement at "on timer" that closes the splash screen. It's a basic proceedure I have been using sucessfully that seems to work smoothly. It opens my startup screen for a predetermined amount of time, closes it and opens the next form and/or switchboard.

Gary

xCav8r
06-06-2005, 08:47 AM
Sorry, my fault for not having been clearer. I should have said use the timer event with a timer interval. Example:


Private Sub Form_Timer()
DoCmd.Close
DoCmd.OpenForm "frmSwitchboard"
End Sub


The interval is set up on the event tab of the form properties dialog box.
:thumb

skaseman
06-06-2005, 08:48 AM
Boy, you guys have a way of hashing things out, don't you!

(I'm very grateful to have my splash screen bright and functional! Thanks!)

GaryB
06-06-2005, 08:50 AM
Great,

It might be helpful if you posted what you eventually did.

Thanks

Gary

skaseman
06-06-2005, 10:45 AM
Sorry, my fault for not having been clearer. I should have said use the timer event with a timer interval. Example:


Private Sub Form_Timer()
DoCmd.Close
DoCmd.OpenForm "frmSwitchboard"
End Sub


The interval is set up on the event tab of the form properties dialog box.

That's what I did and it worked great! Thanks, xCav8r! :friends:

xCav8r
06-06-2005, 07:37 PM
Boy, you guys have a way of hashing things out, don't you!

(I'm very grateful to have my splash screen bright and functional! Thanks!)

Sometimes communication takes a little extra effort. ;)

So, how about showing us a snapshot of your nifty splash? :*)

skaseman
06-07-2005, 06:00 AM
Ok. I made the screen a jpg. How do I get images to "appear"? It's not part of a web, so how do I show something from my hard drive?

(I could submit an attachment, but I suspect there's another way to show an image.)

xCav8r
06-07-2005, 06:37 AM
Save it to a web server and post a link to the URL.

skaseman
06-07-2005, 06:51 AM
I can just "borrow" someone's web server name?

Sorry for this uneducated (i.e. dumb) question, but I've never done this before...
:blush

xCav8r
06-07-2005, 06:55 AM
No, you need to have access to a web server on which you can save you image (like you would on your own hard drive). http://www.freewebspace.net/

skaseman
06-07-2005, 07:14 AM
Let's try this:

My first splash screen (www.savefile.com/files/3351962)

:content:

xCav8r
06-07-2005, 09:26 PM
I'd recommend setting the border style to none.

skaseman
06-08-2005, 05:50 AM
Great idea! Thanks!