Index progress bar

HMG en Español

Moderator: Rathinagiri

trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: Index progress bar

Post 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
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: Index progress bar

Post 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
User avatar
Pablo César
Posts: 4059
Joined: Wed Sep 08, 2010 1:18 pm
Location: Curitiba - Brasil

Re: Index progress bar

Post 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.
HMGing a better world
"Matter tells space how to curve, space tells matter how to move."
Albert Einstein
User avatar
srvet_claudio
Posts: 2193
Joined: Thu Feb 25, 2010 8:43 pm
Location: Uruguay
Contact:

Re: Index progress bar

Post by srvet_claudio »

trmpluym wrote: Sun Mar 26, 2017 10:00 am 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
Thanks
Best regards.
Dr. Claudio Soto
(from Uruguay)
http://srvet.blogspot.com
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: Index progress bar

Post by trmpluym »

Dear HMG friends,

I found a workaround myselves :D , 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
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Index progress bar

Post by serge_girard »

What a nasty way to get around...!
Serge
There's nothing you can do that can't be done...
trmpluym
Posts: 303
Joined: Tue Jul 15, 2014 6:52 pm
Location: The Netherlands

Re: Index progress bar

Post 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 !
User avatar
serge_girard
Posts: 3161
Joined: Sun Nov 25, 2012 2:44 pm
DBs Used: 1 MySQL - MariaDB
2 DBF
Location: Belgium
Contact:

Re: Index progress bar

Post by serge_girard »

Well, nobody (and nothing) is perfect....
Serge
There's nothing you can do that can't be done...
Post Reply