View previous topic :: View next topic |
Author |
Message |
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Feb 06, 2003 11:05 pm Post subject: Progress Bar Example |
|
|
When I first learned VDS, I was confused with progress bars. Here is a
bare bones progress bar example with no other code thrown into it.
Code: | Title Progress Bar Example
DIALOG CREATE,Progress Bar Example,-1,0,250,79,NOMIN
DIALOG ADD,PROGRESS,PROGRESS1,17,13,222,24,0
DIALOG ADD,BUTTON,Go,50,54,64,24,Go
DIALOG ADD,BUTTON,Close,50,120,64,24,Close
DIALOG SHOW
:Evloop
%x = 0
wait event
goto @event()
:GoBUTTON
repeat
wait .0000001
%x = @succ(%x)
dialog set,PROGRESS1,@succ(%x)
until @equal(%x,100)
wait 2
goto evloop
:CloseBUTTON
:Close
exit |
_________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Thu Feb 06, 2003 11:30 pm Post subject: |
|
|
Hey FF,
I don't think there's a problem with making one "tutorial" type
post here - but ya prolly should put other similiar posts (such as
this one) as a reply, or append them to the original post.
Otherwise we're gonna wind up with the knowledge base cluttered
with a bunch of standard code samples - and that's what the source
code sections are for.
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Thu Feb 06, 2003 11:48 pm Post subject: |
|
|
Oops.
Terribly sorry... I forgot that. I'll move this post. _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
kenmcn816 Newbie
Joined: 26 Mar 2003 Posts: 6
|
Posted: Wed Mar 26, 2003 9:24 pm Post subject: Progress Bar Indicator |
|
|
I saw this example and wondered if it would work to add a progress bar to a rather large file that was being copied from a network drive to a local hard drive. The file size is around 800MB and I wanted to try and mirror the Windows file copy dialog that shows the progress bar along with an estimation of time remaining. Thanks for any help anyone can give me. |
|
Back to top |
|
|
FreezingFire Admin Team
Joined: 23 Jun 2002 Posts: 3508
|
Posted: Wed Mar 26, 2003 9:27 pm Post subject: |
|
|
Are you trying to find an example which displays the progress of a file
copy? _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
Back to top |
|
|
ACE Valued Newbie
Joined: 05 Sep 2002 Posts: 34
|
Posted: Wed Mar 26, 2003 10:57 pm Post subject: |
|
|
there is no way to set a proggres bar during a file copy operation, the FILE commands dont return the control to VDS until have finished with the operation. But you can do this:
Make 2 proggrams, one with GUI that will be your frontend with animation or proggres and so, an another without GUI, no window, this will be your file server that will wait commands from the GUI to copy/move or do the file operation you send.
Both proggrams will start and open a memorymap file with VDSMEM, so you can send commands and instruct the server to copy, move or anything you need to do with files via memorymapchange events.
In this way, you start a file copy and return inmediatly the control to vds so you can continue to animate or setting the progres bar and giving the status to the user.
For the progress bar, you can check the size of the local file (the destination file) periodically, say every 1 or 2 seconds and do your maths to set the progress bar and the estimate time
if you need more info on this please ask, i cant post code, cause im not a vds user yet (cant wait for vds5 ) but i can explain it in more detail
Lioric |
|
Back to top |
|
|
Serge Professional Member
Joined: 04 Mar 2002 Posts: 1480 Location: Australia
|
Posted: Thu Mar 27, 2003 11:50 am Post subject: |
|
|
ace,
what a great idea!!!
i often wondered how to do that and you came up with a great piece of lateral thinking
simply brilliant!!!
Serge _________________
|
|
Back to top |
|
|
PGWARE Web Host
Joined: 29 Dec 2001 Posts: 1563
|
Posted: Thu Mar 27, 2003 1:55 pm Post subject: |
|
|
You can also create a gosub routine within your main program, then launch the program with a commandline option>
run %0 /copyroutine
In your script you need to check the first commandline variable %1 and if it equals /copyroutine then it should go to the gosub portion and exit after done. This allows you to ship one exe' and have code that can simulate 2 seperate programs. You can then use VDSMEM as Ace suggested to communicate with the two processes. |
|
Back to top |
|
|
ACE Valued Newbie
Joined: 05 Sep 2002 Posts: 34
|
Posted: Fri Mar 28, 2003 10:08 pm Post subject: |
|
|
Thanks Serge, im glad to help
Now you know why i said that PGWARE is one of the best vds dll authors , great dlls
(of course mine will be avaliable soon/i hope)
Lioric |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Fri Mar 28, 2003 11:15 pm Post subject: |
|
|
Just curious ACE - you've been a member on this board
for almost 7 months and haven't purchased VDS, and the
free trial period is 28 days (I think).
Members have been banned for using pirated versions,
is that the reason you're not posting code?
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
ACE Valued Newbie
Joined: 05 Sep 2002 Posts: 34
|
Posted: Sat Mar 29, 2003 10:34 pm Post subject: |
|
|
Mac, i dont have vds in my computer, as a software developer i dont use others software without registering as i dont like other people using non registered copies of my software (i think its called moral). Anyway, why i will be using a noncompilable language (in eval i was unable to compile, im right?) when i use c++
I decided to but vds right after my eval time ( like 40 or 45 days , sorry i was unable to test it every day, so itook me some weekends ) the only thing that didnt let me buy it was money , but like 2 months or so i saw that VDS5 is comming soon, so i decided to wait for it, The makers of vds didnt say nothing about "buy vds4 now and get vds5 free when comes out", so i dont want to pay an upgrade for just a few weeks, as i didnt started any project in vds, i dont need it right now, i can wait ( but no more that a few weeks )
VC++ is my principal language , and vds will not be integrated in my actual projects, but in the new ones will be
i think you get the wrong idea when i worte
"i cant post code beacuse"
its not "i cant" because i can get banned for using a bad copy of vds, its "i cant" post code because i dont remember all the commands and their parameters, and "i cant" test it somewhere. Thats is why i just post the general ideas or algoritms
I dindt know that you need to buy vds to post here, sorry i thought that this was a particular forum, please get my apologizes, i will not post anymore until i get vds ( hope soon )
Lioric |
|
Back to top |
|
|
cnodnarb Professional Member
Joined: 11 Sep 2002 Posts: 762 Location: Rockeledge, GA
|
Posted: Sat Mar 29, 2003 11:11 pm Post subject: |
|
|
Hmm...
I'm afraid I disagree with a no post policy for non-registered users. ACE's conduct has not been as that of Halloween Hia's and other script kiddies that have posted on this board in the past...perhaps amnesty should be granted in certain situations...
What of users of the Free Version of VDS 2.5 16 bit (OKAY, I'm grasping at straws there probably aren't any LoL)? They can't use the board?
What of guest speakers in other areas of expertise? Say a web programmer wants to do a post on how to generate reports properly for printing...
OK. So these aren't the most likely situations in the world. My main gripe is Ace contributes...and now he feels he can't. He's not generating illegal distributions of programs made in VDS...so I think he's OK. Just my opinion.
NodNarb |
|
Back to top |
|
|
LOBO Valued Contributor
Joined: 14 Mar 2002 Posts: 241 Location: Wilmington, Delaware, USA
|
Posted: Sat Mar 29, 2003 11:30 pm Post subject: |
|
|
cnodnarb wrote: | My main gripe is Ace contributes...and now he feels he can't. He's not generating illegal distributions of programs made in VDS...so I think he's OK. Just my opinion. |
One that I agree with NodNarb
Ace has been contributing to the board.
My two cents added in,
Mark |
|
Back to top |
|
|
Mac Professional Member
Joined: 08 Jul 2000 Posts: 1585 Location: Oklahoma USA
|
Posted: Sun Mar 30, 2003 12:19 am Post subject: |
|
|
C'mon guys - I never threatened ACE nor said non-VDS users
shouldn't post here - in fact I started my post with "Just curious".
However as FF said, we've had pirates/hackers/crackers here
before - and many have contributed (contrary to all the hype
and putdowns, these guys are NOT stupid). Some have also
contributed DLLs with worms/trojans, and it was prolly one of
these that almost destroyed all the board data a while back.
ACE, if you're tellin' the truth then I have no problem with you
being here at all. However, I also find it rather hard to believe
that someone with your programming skills would spend several
months on a language specific board with no working copy of
the language. Even if you spent 45 days evaluating VDS, that
leaves over 5 months of just hanging around here and the DLL
developer board. And while it's not impossible, surely even you
can see why it looks suspicious...
Cheers, Mac _________________ VDSug.dll does file IO, check/disable menu items,
non-VDS dlls, draw functions and more...
Free download (30k dll size) at:
http://www.vdsworld.com/download.php?id=361
|
|
Back to top |
|
|
Tommy Admin Team
Joined: 16 Nov 2002 Posts: 746 Location: The Netherlands
|
Posted: Sun Mar 30, 2003 12:25 am Post subject: |
|
|
NodNarb, please....
We have always taken into account these groups of people you mentioned. If you've ever used the author control panel of VDSWORLD you'll probably have noticed that it will be neccesary to be a licensed user of VDS in order to be able to add your files to VDSWORLD, but that evaluating users and users of personal VDS are considered licensed users as well.
Also it is fine for ACE to stay. The licensed-users-only condition only applies to the author control panel and not this forum. We will not tolerate users that are pirating VDS on this forum though, which are people using an illegal key file with VDS or people who have been using VDS beyond its evaluation period. Once people cease either of these two actions, chances are they will be allowed to participate in this forum again. On the other hand of course usually all people, even pirating ones, are usually allowed to read the forum at the very least.
Tommy
cnodnarb wrote: | Hmm...
I'm afraid I disagree with a no post policy for non-registered users. ACE's conduct has not been as that of Halloween Hia's and other script kiddies that have posted on this board in the past...perhaps amnesty should be granted in certain situations...
What of users of the Free Version of VDS 2.5 16 bit (OKAY, I'm grasping at straws there probably aren't any LoL)? They can't use the board?
What of guest speakers in other areas of expertise? Say a web programmer wants to do a post on how to generate reports properly for printing...
OK. So these aren't the most likely situations in the world. My main gripe is Ace contributes...and now he feels he can't. He's not generating illegal distributions of programs made in VDS...so I think he's OK. Just my opinion.
NodNarb |
|
|
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
|
|