October 30, 2025, 05:18:56 PM

News:

IonicWind Snippit Manager 2.xx Released!  Install it on a memory stick and take it with you!  With or without IWBasic!


Progress Control with counter

Started by Brian, June 15, 2011, 10:01:05 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Brian

Hi,

I'm using the Progress Control, with no problems. I've just loaded a program on my
PC, and the progress control with the installer showed a percentage number, and
counted up until it got to 100%

I notice there are no commands to do that with the Control Pak. Any ideas on
how to go about it? Purely aesthetical, of course!

Brian

LarryMc

The attached zip contains 3 source file written by Bevets (RIP) who wrote the original Control Pak.

This should be all you need to do whatever you want to do.

Also a couple of screen shots.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Thanks, Larry,

Never seen those before

Brian

Brian

Hmmm,

I don't have any error messages, but I don't seem to be able to get
SetProgressBarColor to do anything

I was setting it to a reddish colour while working, then to green when
it was finished, but get nothing

Brian

LarryMc

Are you using the Control Pak to create your progressbar or are you using some of the code I posted above?

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

LarryMc

Since I don't know what code you are using I can only guess.
This code uses the ControlPak commands.
It starts with a red bar and when it is finished it turns green and stops.

WINDOW win
openwindow win,0,0,230,100,@SIZE|@MINBOX|@MAXBOX,0,"ProgressBar Demo",&mainwindow
ProgressControl(win,10,30,200,20,@BORDER,@EXCLIENTEDGE,50)
SetProgressRange win,50,0,500
SetProgressStep win,50,50
SetProgressBarColor win, 50, RGB(255,0,0)
starttimer win,1000
waituntil iswindowclosed(win)
end

SUB mainwindow
select @CLASS
case @IDCLOSEWINDOW
stoptimer win
closewindow win
case @IDTIMER
if GetProgressPosition(win, 50) >= 500
SetProgressBarColor win, 50, RGB(0,255,0)
stoptimer win
else
ProgressStepIt(win, 50)
SetProgressBarColor win, 50, RGB(255,0,0)
endif
CASE @IDCREATE
CENTERWINDOW win
endselect
return
endsub


Hope this will get you over the hump.

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library

Brian

Larry,

Yes, I was using the Control Pak

Well, your version works as it should, and I have followed your example,
but can't get mine to work. The only difference is you are using a timer

I've tried the call in different places, with no effect. Still, as I said, it was
really only for aesthetic reasons I was including it

But the your code is stored away . . .

Many thanks,

Brian

LarryMc

Email me your code and I'll see if I can fix it (if you care to)

LarryMc
LarryMc
Larry McCaughn :)
Author of IWB+, Custom Button Designer library, Custom Chart Designer library, Snippet Manager, IWGrid control library, LM_Image control library