| View previous topic :: View next topic |
| Author |
Message |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Wed Oct 20, 2004 6:31 am Post subject: 'Funny' progress bars |
|
|
Hey,
I was wondering if anybody knew how to create the following sort of progress bars:
You know, those progress bars which don't really indicate something, but the dark bit of it keeps going from left to right and from right to left, to indicate that the program is doing something.
This probably will sound a bit vague, but I hope somebody of you understands what I mean
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Wed Oct 20, 2004 7:49 am Post subject: |
|
|
You might be able to do this with a normal progress bar. Just put it on your dialog, and put a BITBTN (without an image) on top of it. Then, when you increase the value of the progress bar, also increase the width of the bitbtn so that it will hide the beginning of the progress bar.
Hmm... Seems a bit unclear , I'll see if I can come up with an example today....  _________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Wed Oct 20, 2004 9:45 am Post subject: |
|
|
Hmm I thought of another way at school too
Why not using 2 shape elements, one for the progress-background and one for the progress-foreground...
I'll post my example today too
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Oct 20, 2004 11:36 pm Post subject: |
|
|
I assume you're talking about the ones like in Windows XP?
I would use an animated graphic or AVI file if you ask me.. that's what
they truly are.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Thu Oct 21, 2004 6:00 am Post subject: |
|
|
Yes I thought about that too, but the problem is that I can't find them in any file (using ResHack)...
How wait! Marty made his vdsxflash extensions donationware! So... I could also create a flash movie which imitates that bouncing progress bar
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Thu Oct 21, 2004 9:18 am Post subject: |
|
|
Problem is that using the vdsxflash extension requires the Flash Player to be installed... this hasn't got to be a problem of course, but I would like to add some "silent" way of installing them, without that confirmation box stating "Do you want to install Flash Playerr 7?". Any ideas?
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
jules Professional Member


Joined: 14 Sep 2001 Posts: 1043 Location: Cumbria, UK
|
Posted: Thu Oct 21, 2004 10:08 am Post subject: |
|
|
Couldn't you create two bitmaps, one for the background and one for the indicator. In a loop, change the left position of the indicator one using window setpos? _________________ The Tech Pro
www.tech-pro.net |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
Posted: Thu Oct 21, 2004 10:38 am Post subject: |
|
|
How's this?
| Code: | #define command,AddCoolProgress
#define command,SetCoolProgress
DIALOG CREATE,New Dialog,-1,0,320,160
DIALOG SHOW
# AddCoolProgress <name>,<top>,<left>,<width>,<height>,<pos1>,<pos2>
AddCoolProgress progress1,50,50,250,25,25,50
info Lets begin!
# SetCoolProgress <name>,<pos1>,<pos2>
SetCoolProgress progress1,0,1
# Loop three times
%y = 3
repeat
%z = 0
repeat
# First loop the first 25 %
wait 0.0001
SetCoolProgress progress1,0,%z
%z = @succ(%z)
until @equal(%z,25)
repeat
# Then the whole bar is visible, only change the left position
wait 0.0001
SetCoolProgress progress1,@diff(%z,25),%z
%z = @succ(%z)
until @equal(%z,100)
repeat
# And now "shrimp"...
wait 0.0001
SetCoolProgress progress1,@diff(%z,25),100
%z = @succ(%z)
until @equal(%z,125)
%y = @pred(%y)
until @equal(%y,0)
info Done...
:Evloop
wait event
goto @event()
:Close
exit
:AddCoolProgress
DIALOG ADD,SHAPE,%1PROGRESSSHAPE1,%2,%3,%4,%5,D6D3CE,848284,,RECTANGLE
DIALOG ADD,SHAPE,%1PROGRESSSHAPE2,@sum(%2,%5,-1),%3,%4,1,WHITE,WHITE,,RECTANGLE
DIALOG ADD,SHAPE,%1PROGRESSSHAPE3,%2,@sum(%3,%4,-1),1,%5,WHITE,WHITE,,RECTANGLE
%%TempLeft = @format(@fmul(@fdiv(@diff(@dlgpos(%1PROGRESSSHAPE1,w),4),100),%6),0.0)
%%TempWidth = @diff(@format(@fmul(@fdiv(@diff(@dlgpos(%1PROGRESSSHAPE1,w),4),100),%7),0.0),%%TempLeft)
DIALOG ADD,SHAPE,%1PROGRESSSHAPE4,@sum(%2,2),@sum(%3,2,%%TempLeft),%%TempWidth,@diff(%5,4),08246B,08246B,,RECTANGLE
exit
:SetCoolProgress
%%TempLeft = @format(@fmul(@fdiv(@diff(@dlgpos(%1PROGRESSSHAPE1,w),4),100),%2),0.0)
%%TempWidth = @diff(@format(@fmul(@fdiv(@diff(@dlgpos(%1PROGRESSSHAPE1,w),4),100),%3),0.0),%%TempLeft)
DIALOG SETPOS,%1PROGRESSSHAPE4,,@sum(@dlgpos(%1PROGRESSSHAPE1,L),2,%%TempLeft),%%TempWidth
exit |
_________________ [ Add autocomplete functionality to your VDS IDE windows! ]
Voor Nederlandse beginners met VDS: bekijk ook eens deze tutorial! |
|
| Back to top |
|
 |
SnarlingSheep Professional Member


Joined: 13 Mar 2001 Posts: 759 Location: Michigan
|
Posted: Thu Oct 21, 2004 2:50 pm Post subject: |
|
|
| FreezingFire wrote: | I would use an animated graphic or AVI file if you ask me.. that's what
they truly are. :) |
Actually, I believe they are a progressbar window with the PBS_MARQUEE($08) style. Adding that style to the VDS progressbar shouldn't be too hard, but I'm not sure how it'll react to the VDS SET commands..
| Quote: |
PBS_MARQUEE
Version 6.0 or later. The progress bar moves like a marquee.
Note Comctl32.dll version 6 is not redistributable but it is included in Microsoft Windows XP or later. To use Comctl32.dll version 6, specify it in a manifest. For more information on manifests, see Using Windows XP Visual Styles.
|
_________________ -Sheep
My pockets hurt... |
|
| Back to top |
|
 |
PGWARE Web Host

Joined: 29 Dec 2001 Posts: 1565
|
Posted: Thu Oct 21, 2004 5:28 pm Post subject: |
|
|
Use this code below, it will ONLY work with VDS 5 or higher and you need to run Windows XP or 2003:
| Code: |
#define command,MARQUEEPROGRESS
title MarQuee Progress Test
DIALOG CREATE,MarQuee Progress Test,-1,0,240,160
DIALOG ADD,PROGRESS,PROGRESS1,67,33,170,20,0
DIALOG SHOW
rem this is a custom command, you need to pass the name of
rem progress bar (here it is 'progress1', then we pass how fast
rem we want the progress bar marquee to animate. I set it to
rem 50 milliseconds - which determines time between progress
rem bar animations.
MARQUEEPROGRESS PROGRESS1,50
:evloop
wait event
goto @event()
:close
exit
rem This command turns the marquee progress on for the progressbar
:MARQUEEPROGRESS
if @winexists(~%1)
if @numeric(%2)
rem here we set the window style PBS_MARQUEE to the progressbar
loadlib user32.dll
%X = @lib(user32, GetWindowLongA, INT:, @strdel(@winexists(~%1), 1, 1), -16)
%Z = @lib(user32, SetWindowLongA, INT:, @strdel(@winexists(~%1), 1, 1), -16, @sum(%X, $0 )
rem here we turn the marquee on using PBM_SETMARQUEE message
%X = @sendmsg(@winexists(~%1), @sum($400,10), 1, %2)
rem to turn off the marquee simply use the window message below
rem %X = @sendmsg(@winexists(~%1), @sum($400,10), 0, 0)
freelib user32.dll
end
end
exit
|
Last edited by PGWARE on Thu Oct 21, 2004 5:50 pm; edited 5 times in total |
|
| Back to top |
|
 |
Skit3000 Admin Team

Joined: 11 May 2002 Posts: 2166 Location: The Netherlands
|
|
| Back to top |
|
 |
Vic D'Elfant Past Contributor


Joined: 26 Jun 2002 Posts: 673 Location: The Netherlands
|
Posted: Thu Oct 21, 2004 5:47 pm Post subject: |
|
|
Woa... nice scripts! Thanks guys
Vic _________________ phpBB Development Team |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Fri Oct 22, 2004 12:46 am Post subject: |
|
|
Nice job guys on the scripts
PK you might want to post that in the VDS 5 Source Code forum.  _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You can attach files in this forum You can download files in this forum
|
|