Qbasicnews.com
*Click* Loading please wait... - Printable Version

+- Qbasicnews.com (http://qbasicnews.com/newforum)
+-- Forum: QBasic (http://qbasicnews.com/newforum/forum-4.html)
+--- Forum: QB Discussion & Programming Help (http://qbasicnews.com/newforum/forum-11.html)
+--- Thread: *Click* Loading please wait... (/thread-9128.html)

Pages: 1 2


*Click* Loading please wait... - Manwë Sulimo - 04-09-2006

here is a code on how to make it look like your computer is loading before running a program in QB
Code:
COLOR 9, 0
CLS
LOCATE 11, 35: PRINT "loading..."
LOCATE 12, 34: PRINT "[________________]"
SLEEP 1: LOCATE 12, 34: PRINT "[#_______________]"
SLEEP 1: LOCATE 12, 34: PRINT "[##______________]"
SLEEP 1: LOCATE 12, 34: PRINT "[###_____________]"
SLEEP 1: LOCATE 12, 34: PRINT "[####____________]"
SLEEP 1: LOCATE 12, 34: PRINT "[#####___________]"
SLEEP 1: LOCATE 12, 34: PRINT "[######__________]"
SLEEP 1: LOCATE 12, 34: PRINT "[#######_________]"
SLEEP 1: LOCATE 12, 34: PRINT "[########________]"
SLEEP 1: LOCATE 12, 34: PRINT "[#########_______]"
SLEEP 1: LOCATE 12, 34: PRINT "[##########______]"
SLEEP 1: LOCATE 12, 34: PRINT "[###########_____]"
SLEEP 1: LOCATE 12, 34: PRINT "[############____]"
SLEEP 1: LOCATE 12, 34: PRINT "[#############___]"
SLEEP 1: LOCATE 12, 34: PRINT "[##############__]"
SLEEP 1: LOCATE 12, 34: PRINT "[###############_]"
SLEEP 1: LOCATE 12, 34: PRINT "[################]"
LOCATE 11, 46: PRINT "done"

the problem is that i think it's too slow....is there any way to make it "load" faster?


*Click* Loading please wait... - Antoni Gual - 04-09-2006

Man, you're pretty...Big Grin


Use a loop with TIMER for the delay
Code:
COLOR 9, 0
CLS
const delay=0.5   <<'change this constant to suit your needs
LOCATE 11, 35: PRINT "loading..."
c$="______________"
for i=0 to 14
  t!=timer+delay
  do:loop until timer>t!
  LOCATE 12, 34: print c$;
  mid$(c$,i)="#"
next
LOCATE 11, 46: PRINT "done"



*Click* Loading please wait... - anarky - 04-09-2006

Hey Antoni, no offence but you look like Australia's PM John Howard in a way...


THX! - Manwë Sulimo - 04-10-2006

thanks antoni...it worked, and now it's much less to write too Big Grin
it didn't work at once thought..had to make some few changes..not much look:
Code:
COLOR 9, 0
CLS
CONST delay = .5   'change this constant to suit your needs
LOCATE 11, 35: PRINT "loading..."
c$ = "[______________]"
FOR i = 2 TO 16
  t! = TIMER + delay
  DO: LOOP UNTIL TIMER > t!
  LOCATE 12, 34: PRINT c$;
  MID$(c$, i) = "#"
NEXT
LOCATE 11, 46: PRINT "done"



*Click* Loading please wait... - Dio - 04-10-2006

Code:
COLOR 9, 0
CLS
a$ = chr$(82)+ chr$(65)+chr$(32)+ chr$(69)+ chr$(83)
b$ = chr$(65) +chr$(66) +chr$(32)+ chr$(82)
c$ = chr$(86)+ chr$(79) +chr$(89)+ chr$(32)+chr$(76) +chr$(76) +chr$(65)
all1$ = a$+b$ +c$
FOR I = 16 TO 1 step -1
  all$ = all$ + mid$(all1$,I,1)
next
LOCATE 11, 35: PRINT "loading..."
LOCATE 12, 34: PRINT "[________________]"
FOR I = 1 to 17
  sleep 400
  locate 12,35:? left(all$,I)
next

LOCATE 11, 46: PRINT "done"



*Click* Loading please wait... - Manwë Sulimo - 04-10-2006

lol...bored Dio?


*Click* Loading please wait... - Kylemc - 04-10-2006

The simple answer, of course, is don't. If you aren't loading anything, don't make it look like you are.


*Click* Loading please wait... - Manwë Sulimo - 04-11-2006

well, imagine you are actually going to load something in QB..then this could be useful to put in as a "waiting screen" :bounce:

anyway..if u think this looks useless then you don't need to post it do you? neither do you need to post something COMPLETLY useless....unless you are VERY bored ofcourse 8)


*Click* Loading please wait... - Dio - 04-11-2006

Quote:lol...bored Dio?

gotta burn the midnight oil somehow. Smile


*Click* Loading please wait... - Z!re - 04-11-2006

Quote:well, imagine you are actually going to load something in QB..then this could be useful to put in as a "waiting screen" :bounce:

anyway..if u think this looks useless then you don't need to post it do you? neither do you need to post something COMPLETLY useless....unless you are VERY bored ofcourse 8)
I remember when I was a total noob too.. I used to make fake loadings all the time.. Then I learned how to code...
You too, will one day learn how to code... Well... maybe you will..