Page 3 of 3
Re: Index progress bar
Posted: Sun Mar 26, 2017 7:00 am
by trmpluym
Hi Pablo and Serge,
Thank you both for testing !
I can now confirm the problem is related to the Windows themes. When i switch my (Windows 7 64 bits) theme back to 'Classic' (Windows XP looks) the problem does not occur !
But switching back to this retro theme is not very practical. I even doubt this theme is available in Windows 10.
Hopefully Claudio can find a solution.
Theo
Re: Index progress bar
Posted: Sun Mar 26, 2017 10:00 am
by trmpluym
Hi Claudio,
I found out progress bar problem using the aero theme is well known. Because i have no knowledge of C programming i cannot fix it my selves. But i try to help finding some related articles on the internet. Maybe it can help you to fix this issue
http://derekwill.com/2014/06/24/combati ... ogressbar/
http://stackoverflow.com/questions/2217 ... ss-bar-bug
https://social.msdn.microsoft.com/Forum ... vblanguage
Best regards,
Theo
Re: Index progress bar
Posted: Sun Mar 26, 2017 12:16 pm
by Pablo César
That's right , Theo.
Right way in trying to help. Yesterday night I was so tired after kilometers of cycling... and was thinking in the same way to look out in ternet with the same problem...
Lets wait Claudio certainly will give us a return. I understand you frustration... we can not obligue to user for not themed Windows...
But sometimes Miscrosoft makes their own complications with their OS.
Re: Index progress bar
Posted: Sun Mar 26, 2017 3:49 pm
by srvet_claudio
Re: Index progress bar
Posted: Sun Mar 26, 2017 6:12 pm
by trmpluym
Dear HMG friends,
I found a workaround myselves

, based on this article:
http://derekwill.com/2014/06/24/combati ... ogressbar/
The C solution also works in HMG. Here it is:
Code: Select all
*------------------------------------------------------------*
#include "hmg.ch"
*------------------------------------------------------------*
Function Main
DEFINE WINDOW Win_1 ;
ROW 0 ;
COL 0 ;
WIDTH 640 ;
HEIGHT 480 ;
TITLE 'Test' ;
WINDOWTYPE MAIN
DEFINE BUTTON btnAanpassen
ROW 400
COL 80
WIDTH 100
HEIGHT 28
CAPTION "Start"
ACTION StatusBar()
END BUTTON
END WINDOW
Win_1.Center
Win_1.Activate
Return
*------------------------------------------------------------*
Function StatusBar()
DEFINE WINDOW frmProgress ;
ROW 0 ;
COL 0 ;
WIDTH 355 ;
HEIGHT 100 ;
TITLE "Progress:" ;
WINDOWTYPE MODAL ;
NOSYSMENU ;
ONINIT StartTest()
@ 20,20 PROGRESSBAR Progress_1 ;
RANGE 0,100 ;
VALUE 0 ;
WIDTH 300 HEIGHT 25
END WINDOW
CENTER WINDOW frmProgress
ACTIVATE WINDOW frmProgress
Return(.T.)
*------------------------------------------------------------*
Function StartTest()
Local nX
For nX := 0 to 100 step 5
IF nX==frmProgress.Progress_1.RangeMax
frmProgress.Progress_1.RangeMax := frmProgress.Progress_1.RangeMax + 1
frmProgress.Progress_1.Value := nX + 1
frmProgress.Progress_1.RangeMax := frmProgress.Progress_1.RangeMax - 1
ELSE
frmProgress.Progress_1.Value := nX + 1
ENDIF
frmProgress.Progress_1.Value := nX
frmProgress.Title := "Progress: " + Str(nX,3)+" %"
MILLISEC(1000)
Next
frmProgress.Release()
return(.T.)
*------------------------------------------------------------*
Theo
Re: Index progress bar
Posted: Mon Mar 27, 2017 8:01 am
by serge_girard
What a nasty way to get around...!
Serge
Re: Index progress bar
Posted: Mon Mar 27, 2017 12:54 pm
by trmpluym
serge_girard wrote: ↑Mon Mar 27, 2017 8:01 am
What a nasty way to get around...!
You are right and this is not a HMG problem but for example it does also occurs in other languages like C !
Shame you Microsoft !
But thanks Serge for testing !
Re: Index progress bar
Posted: Mon Mar 27, 2017 12:56 pm
by serge_girard
Well, nobody (and nothing) is perfect....
Serge