Link to home
Start Free TrialLog in
Avatar of rockroad
rockroad

asked on

Busy Signal 200 POINTS

I have a function which takes about 8 or 9 seconds to finish loading. What i would like is a "working code" example of how to make a little message box or something which would state "working please wait" until the function was through. Don't really want a message box because you have to click the OK Button. Just want it to do this while working and then quitely disappear. Got more points if this is too hard peoples.
Thanks
rockroad
Avatar of Vbmaster
Vbmaster

What about creating a dummy form for this, with just a label saying "Have patience.. Calculating some really hard stuff". Whenever you want to show the form you can use TheDummyForm.Show and hide it with code like Unload TheDummyForm.
Avatar of rockroad

ASKER

Vbmaster--You got something like this to show me? I'm not that great at programming with vb 5.0
For instance, the first question that comes to my "peabrain" is how/when will the dummyform know when the other function is finished ? Anyway, if you have something to add i will be waiting!
Thanks
rockroad
ASKER CERTIFIED SOLUTION
Avatar of pacificdb
pacificdb
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
By the way, set the form's Name property to "Working".
pacificdb--thanks for your comment. I tried your code and got an error:

Public Working(intStatus as Boolean) gives the error and "as" is highlighted?

I'm using visual basic 5.0
I tried placing the code into my form and also is a module and got the same error when i tried to run the program. Any help on this ?
Thanks
rockroad
try
Public sub Busy(intStatus as Boolean)
                                                  If intStatus then
                                                      Working.Show
                                                  Else
                                                      Unload Working
                                                  End If
                                               End Sub

he left the sub bit out
Thanks crazyman, it's always the simple stupid mistakes isn't it ;->
Hehe sure is .
Oh and rockroad if that is what you wanted please give the points to pacificdb as his answer was correct he just missed out one word.
Thanks.
Hey crazyman and Pacificdb--all worked fine after the missing word was fixed. Please leave instructions on how to award the points since this was only commmented. I am new to the new system here!
Thanks to both of you!!!
rockroad
Just throwing my 2 cents in...

You may actually have to do this:


Public sub Busy(intStatus as Boolean)
   If intStatus then
       Working.Show
       Working.Refresh
       DoEvents
   Else
       Unload Working
   End If
End Sub


Otherwise, the system may not allocate enough resources to properly paint the Working screen when you show the form...


Cheers!
Just click on accept comment as answer on one of Pacificdb questions that will give him the points
i mean on one of his comments not questions
Hey you guys, mcrider, you were right about your code too ! Thanks to all and sorry about no points for some of you. You all participated !!!

Thanks
rockroad
So who are you going to award the points to??


Cheers!
pacificdb gets the points because he listed the original code. I hope everyone agree's with this.
Thanks
rockroad
Thanks Again pacificdb !!!
rockroad
We're here to help :-)