Display a temp message

snath
07-28-2000, 01:01 PM
How do I display a temporary message such as:
'One moment please......'
while my next form is being loaded.

Derek Stone
07-28-2000, 02:31 PM
Just create a form which says "One Moment Please..." on it.
Add this in the new form's Form_Load() event, replacing "TheOtherForm" with the name of your main form:

<font color=blue>
Load TheOtherForm
TheOtherForm.Show
Unload Me
</font color=blue>

If you are running the above code on a fast sytem you may never see the "One Moment Please..." message but obviously it is not necessary if the person does not have to wait.
On slower systems it will load the main form and then hide the "One Moment Please..." form and then show the main form.
Got it?
Good.
-cl

snath
08-25-2000, 05:48 PM
Thanks for trying to help me.

Sparkey
08-26-2000, 10:32 PM
Why not use the timer control? Then you can make the form (the one you create with a label saying "One moment please....") stay on screen as long or short a time as you want. Play around with the Interval property until you are happy with how long it stays on screen.

At the appropriate time, load this form and load the other form (the one that takes a while to load) put the form unload and the show command for the next form you want to show in the timer event.

In the form properties, set the ControlBox property to false and remove any Caption text. Doing this will remove the blue caption bar at the top of the form and make it look better (for message display) as well as removing any way of the user closing it off.

I've sent you a small sample prog to show you what I mean.

Valkyrie
08-28-2000, 02:34 PM
My two cents...

Put the Show command then put the command that is causing the user to wait. After that put the Unload. That way the form only stays loaded as long as the action takes to complete.

Regards.

Quote of the moment....
"When you cease to make a contribution you begin to die"

Sparkey
08-28-2000, 03:21 PM
You know Valkyrie, your two cents worth is always good advice!! You should call it "My 50 bucks worth"!!

Seriously though, I think that's good advice. A timer control is a good idea if you know exactly how long that form needs to stay on screen, and that will change with the speed of system running it.

Another suggestion Sue, you could display the wait cursor to indicate the delay by setting the form’s MousePointer property to vbHourglass (11). That might eliminate the need for a "Please wait" message....everyone knows the hourglass means "Be patient, it is loading".

snath
08-28-2000, 03:26 PM
Thanks. That's what I ended up doing. But, I have seen Users who 'can't see' the hourglass !!!!!!! They don't wait, they keep clicking buttons. That is why I thought I can put a screen up showing them 'Please wait....'.

SeiferTim
08-28-2000, 03:32 PM
Whaddaya mean can't see the Hourglass? There must be something wrong in your code... That's all I can say... But you could make an elaborate lock up system that until your for is ready, nothing happens whenever something is clicked...

-Seifer Tim

Visit my Web-Site: http://solenoid.50megs.com

Sparkey
08-28-2000, 03:40 PM
I know what you mean about users not seeing the hourglass Sue!!! We are always taught "Remember that not all users are experts. Make your application user-friendly". I've discovered that what that REALLY means is "Make your application idiot proof" (no offence to users intended!). As you say, sometimes it's better to put a message up on screen and make it stay for a few seconds, even when it's unnecessary and the hourglass should have been fine!! You obviously know your target audience!

Regards

Valkyrie
08-29-2000, 02:22 PM
Thanks for the strokes Shirley....You have hit the nail on the head though. There is much to be said for the KISS method. Every program has at least one Forest Gump or Gomer Pyle for a user and your program has to accommodate them. Hour glass is good...msgbox is better.

Good luck Sue.

Quote of the moment....
"When you cease to make a contribution you begin to die"

Sparkey
08-29-2000, 02:27 PM
Any time Valkyrie!!! Just telling the truth anyway!!

Like the man said, good luck Sue.

Another quote of the moment I think you'll like:-

"To err is human, but to foul up completely requires a computer!"

BillSoo
08-29-2000, 04:40 PM
It is possible, albeit unlikely, that your users actually cannot see an hourglass because there is no hourglass to see!

I had this happen once to a user whose laptop had a funny mouse driver or something. In anycase, he didn't have the standard mousepointer icons.

"I have a plan so cunning you could put a tail on it and call it a weasel!" - Edmund Blackadder

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum