forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Progress Bar Example
Goto page 1, 2  Next
 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Feb 06, 2003 11:05 pm    Post subject: Progress Bar Example Reply with quote

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
View user's profile Send private message Visit poster's website
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Thu Feb 06, 2003 11:30 pm    Post subject: Reply with quote

Hey FF, Smile

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. Wink

Cheers, Mac Smile

_________________
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
View user's profile Send private message Send e-mail
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Thu Feb 06, 2003 11:48 pm    Post subject: Reply with quote

Oops. Embarassed

Terribly sorry... I forgot that. I'll move this post.

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
kenmcn816
Newbie


Joined: 26 Mar 2003
Posts: 6

PostPosted: Wed Mar 26, 2003 9:24 pm    Post subject: Progress Bar Indicator Reply with quote

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
View user's profile Send private message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Wed Mar 26, 2003 9:27 pm    Post subject: Reply with quote

Are you trying to find an example which displays the progress of a file
copy?

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
ACE
Valued Newbie


Joined: 05 Sep 2002
Posts: 34

PostPosted: Wed Mar 26, 2003 10:57 pm    Post subject: Reply with quote

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 Very Happy ) but i can explain it in more detail

Lioric
Back to top
View user's profile Send private message
Serge
Professional Member
Professional Member


Joined: 04 Mar 2002
Posts: 1480
Location: Australia

PostPosted: Thu Mar 27, 2003 11:50 am    Post subject: Reply with quote

ace,

what a great idea!!!

i often wondered how to do that and you came up with a great piece of lateral thinking Very Happy Very Happy Very Happy

simply brilliant!!!

Serge

_________________
Back to top
View user's profile Send private message Visit poster's website MSN Messenger
PGWARE
Web Host


Joined: 29 Dec 2001
Posts: 1537

PostPosted: Thu Mar 27, 2003 1:55 pm    Post subject: Reply with quote

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
View user's profile Send private message
ACE
Valued Newbie


Joined: 05 Sep 2002
Posts: 34

PostPosted: Fri Mar 28, 2003 10:08 pm    Post subject: Reply with quote

Thanks Serge, im glad to help

Now you know why i said that PGWARE is one of the best vds dll authors Wink, great dlls

(of course mine will be avaliable soon/i hope) Twisted Evil Cool

Lioric
Back to top
View user's profile Send private message
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Fri Mar 28, 2003 11:15 pm    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
ACE
Valued Newbie


Joined: 05 Sep 2002
Posts: 34

PostPosted: Sat Mar 29, 2003 10:34 pm    Post subject: Reply with quote

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 Embarassed , 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 Laughing, 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 Laughing )

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 Very Happy )

Lioric
Back to top
View user's profile Send private message
cnodnarb
Valued Contributor
Valued Contributor


Joined: 11 Sep 2002
Posts: 641
Location: Evansville, IN

PostPosted: Sat Mar 29, 2003 11:11 pm    Post subject: Reply with quote

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
View user's profile Send private message AIM Address
LOBO
Valued Contributor
Valued Contributor


Joined: 14 Mar 2002
Posts: 241
Location: Wilmington, Delaware, USA

PostPosted: Sat Mar 29, 2003 11:30 pm    Post subject: Reply with quote

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 Wink

Ace has been contributing to the board.

My two cents added in,
Mark
Back to top
View user's profile Send private message AIM Address Yahoo Messenger
Mac
Professional Member
Professional Member


Joined: 08 Jul 2000
Posts: 1585
Location: Oklahoma USA

PostPosted: Sun Mar 30, 2003 12:19 am    Post subject: Reply with quote

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 Smile

_________________
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
View user's profile Send private message Send e-mail
Tommy
Admin Team


Joined: 16 Nov 2002
Posts: 737
Location: The Netherlands

PostPosted: Sun Mar 30, 2003 12:25 am    Post subject: Reply with quote

NodNarb, please.... Sad

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
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> Visual DialogScript 4 Source Code All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
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




Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group