Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.clipper.visual-objects > #11520 > unrolled thread

Animation windows

Started by"Paul D B" <pdb@NOMORESPAMhnt.be>
First post2018-03-29 16:02 +0200
Last post2018-04-10 11:35 +0200
Articles 10 — 5 participants

Back to article view | Back to comp.lang.clipper.visual-objects


Contents

  Animation windows "Paul D B" <pdb@NOMORESPAMhnt.be> - 2018-03-29 16:02 +0200
    Re: Animation windows D.J.W. van Kooten <vankooten@removethis.ic2.com> - 2018-03-30 21:00 +0200
      Re: Animation windows "Paul D B" <pdb@NOMORESPAMhnt.be> - 2018-04-03 14:43 +0200
    Re: Animation windows Sherlock <sherlock@sherlock.com.au> - 2018-03-31 01:43 -0700
      Re: Animation windows "Paul D B" <pdb@NOMORESPAMhnt.be> - 2018-04-03 14:40 +0200
        Re: Animation windows "Karl-Heinz" <invalid@invalid.invalid> - 2018-04-04 17:50 +0200
          Re: Animation windows "Paul D B" <pdb@NOMORESPAMhnt.be> - 2018-04-10 11:37 +0200
    Re: Animation windows "Paul D B" <pdb@NOMORESPAMhnt.be> - 2018-04-03 15:11 +0200
    Re: Animation windows "Jamal" <nospam@example.com> - 2018-04-09 10:34 -0400
      Re: Animation windows "Paul D B" <pdb@NOMORESPAMhnt.be> - 2018-04-10 11:35 +0200

#11520 — Animation windows

From"Paul D B" <pdb@NOMORESPAMhnt.be>
Date2018-03-29 16:02 +0200
SubjectAnimation windows
Message-ID<p9irle$79j$1@dont-email.me>
Hi all,

I'm using some "animation window" (inherets from DialogWindow) that shows an 
hourglass and some "Please be patient" stuff. Used it for 15 years!
However in recent Windows versions (8.1 and 10) the hourglass does not 
tumble anymore, it is static. And worse: when it is a long lasting or 
CPU-intensif operation, Windows changes the caption of the dialog in "Not 
responding" which makes some users panic and try to cance it (while they 
just have to wait untill the operation finishes).
Anyone has some better animation window, or a suggestion on how to avoid the 
apparent freezing?

some code
METHOD PostInit(oParent,uExtra) CLASS AnimateWin

// uExtra is the desired animation

LOCAL cAnimationName AS STRING

cAnimationName := AllTrim(uExtra)

SELF:Melding := " "

// open en speel de animatie

DO CASE

CASE cAnimationName =="HOURGLASS"

SELF:oDCAnimation1:OpenResource(110)

CASE cAnimationName =="SEARCH"

SELF:oDCAnimation1:OpenResource(111)

OTHERWISE

SELF:oDCAnimation1:OpenResource(110) // hourglass

ENDCASE

ApplicationExec(EXECWHILEEVENT)

SELF:oDCAnimation1:Play()

ApplicationExec(EXECWHILEEVENT)

RETURN NIL


thanks

Paul 

[toc] | [next] | [standalone]


#11522

FromD.J.W. van Kooten <vankooten@removethis.ic2.com>
Date2018-03-30 21:00 +0200
Message-ID<h42tbddqpa2gp95i37iq7773u8ch0640hm@4ax.com>
In reply to#11520
Replying on message of Thu, 29 Mar 2018 16:02:21 +0200 from Paul D B:


 Hello Paul,

>Anyone has some better animation window, or a suggestion on how to avoid the 
>apparent freezing?
>

What about a progress bar combined with ApplicationExecWhileEVent?

You must have some indication how far you are in the process of course
but otherwise it will prevent Not responding and users see something
happening.

I have progress bars running on conditional operations which means the
progress bar is far from the end when the process is ready. But the
user won't complain about that.

Should you not have code for a progress bar I'll mail you it or post
it here.

Dick

[toc] | [prev] | [next] | [standalone]


#11525

From"Paul D B" <pdb@NOMORESPAMhnt.be>
Date2018-04-03 14:43 +0200
Message-ID<p9vsu1$t18$1@dont-email.me>
In reply to#11522
Hi Dick,

thanks for the suggestion. I'm using progressbars quite a lot here and there 
but 1) I don't have the time to redo every animationdialog that is hanging 
around in my apps and 2) I'm not a big fan of progressbars since they never, 
ever give a reliable idea of the actual progress of the operation. They just 
give the user false hope ;-)

I just want to get my hourglass tumbling again!

Paul

"D.J.W. van Kooten"  schreef in bericht 
news:h42tbddqpa2gp95i37iq7773u8ch0640hm@4ax.com...

Replying on message of Thu, 29 Mar 2018 16:02:21 +0200 from Paul D B:


Hello Paul,

>Anyone has some better animation window, or a suggestion on how to avoid 
>the
>apparent freezing?
>

What about a progress bar combined with ApplicationExecWhileEVent?

You must have some indication how far you are in the process of course
but otherwise it will prevent Not responding and users see something
happening.

I have progress bars running on conditional operations which means the
progress bar is far from the end when the process is ready. But the
user won't complain about that.

Should you not have code for a progress bar I'll mail you it or post
it here.

Dick 

[toc] | [prev] | [next] | [standalone]


#11523

FromSherlock <sherlock@sherlock.com.au>
Date2018-03-31 01:43 -0700
Message-ID<bcdfcd3a-ca35-4dae-8db1-ec90e883084e@googlegroups.com>
In reply to#11520
snip[ Using some "animation window" (inherets from DialogWindow) shows hourglass and some "Please be patient" stuff. However in recent Windows versions (8.1 and 10) the hourglass does not tumble anymore, it is static. ]

My animation never had an issue... any version of Windows.

PROTECT oDCAnimation1 AS ANIMATIONCONTROL

Dialogwindow...

oDCAnimation1 := AnimationControl{SELF,ResourceID{_DLGMULTITRUSTDATABASESELECTION_ANIMATION1,_GetInst()}}
oDCAnimation1:OpenResource(9000)
oDCAnimation1:HyperLabel := HyperLabel{#Animation1,NULL_STRING,NULL_STRING,NULL_STRING}
oDCAnimation1:BackGround := aBrushes[1]

RESOURCE 9000 AVI D:\RESOURCES\LOGO5.AVI


Phil

[toc] | [prev] | [next] | [standalone]


#11524

From"Paul D B" <pdb@NOMORESPAMhnt.be>
Date2018-04-03 14:40 +0200
Message-ID<p9vsok$rv8$1@dont-email.me>
In reply to#11523
Hi Phil,

don't see any  difference with my animationcontrol.  Are you sure your avi 
will play during an intensif operation (e.g. re indexing ). Mine doesn't!

This is what I do:

// show animationbox with Hourglass
oAnimWin := AnimateWin{SELF,"HOURGLASS"}
oAnimWin:caption :=  "Some patience pleased"
oAnimWin:Melding :=  "Files are being reindexed !"
oAnimWin:Show(showcentered)  // non-modal
GetAppObject():Exec(ExecWhileEvent)


IF .NOT. ReindexTKMAIN()
    ERRORBOX{SELF,"TKMAIN.DBF is in use and will not be re-indexed 
!"}:Show()
    lFout := TRUE
ENDIF

IF .NOT. ReindexKLMAIN()
    ERRORBOX{SELF,"KLMAIN.DBF is in use and will not be re-indexed 
!"}:Show()
    lFout := TRUE
ENDIF

IF .NOT. ReindexACACTIE()
    ERRORBOX{SELF,"ACACTIE.DBF is in use and will not be re-indexed 
!"}:Show()
    lFout := TRUE
ENDIF

The hourglass will NOT tumble while a file is being re-indexed. When 
skipping to the next re-index however, it will tumble an quarter and then be 
static again while file 2 is being re-indexed and so on.



Paul

"Sherlock"  schreef in bericht 
news:bcdfcd3a-ca35-4dae-8db1-ec90e883084e@googlegroups.com...

snip[ Using some "animation window" (inherets from DialogWindow) shows 
hourglass and some "Please be patient" stuff. However in recent Windows 
versions (8.1 and 10) the hourglass does not tumble anymore, it is static. ]

My animation never had an issue... any version of Windows.

PROTECT oDCAnimation1 AS ANIMATIONCONTROL

Dialogwindow...

oDCAnimation1 := 
AnimationControl{SELF,ResourceID{_DLGMULTITRUSTDATABASESELECTION_ANIMATION1,_GetInst()}}
oDCAnimation1:OpenResource(9000)
oDCAnimation1:HyperLabel := 
HyperLabel{#Animation1,NULL_STRING,NULL_STRING,NULL_STRING}
oDCAnimation1:BackGround := aBrushes[1]

RESOURCE 9000 AVI D:\RESOURCES\LOGO5.AVI


Phil 

[toc] | [prev] | [next] | [standalone]


#11527

From"Karl-Heinz" <invalid@invalid.invalid>
Date2018-04-04 17:50 +0200
Message-ID<fikai1Fces8U1@mid.individual.net>
In reply to#11524
Hi Paul,

> The hourglass will NOT tumble while a file is being re-indexed. When
> skipping to the next re-index however, it will tumble an quarter and then
> be static again while file 2 is being re-indexed and so on.

I´m using Progressbars only, but there would be the same problem: How to
update the progressbar while the index is created ?
This can be achieved by filling the param 5 and 6 of the server method
SetorderCondition().


5. Param <cbEval>

The code block that is evaluated for every record that is processed, or as
specified below. This code block allows the application to intercede during
the order creation, which might be quite lengthy; it might be used to update
the screen, for example, showing progress
on a thermometer-type display or in the status bar.


6. Param <nInterval>

The numeric expression that modifies the number of times <cbEval> is
evaluated. This argument offers a performance enhancement by evaluating the
condition for every nth record instead of for every record ordered.  To step
through every record, specify a value of 0 or omit the parameter.


some dummy code:

//  modeless Dialog
class YourAniDlg inherit Dialogwindow

// This method is called during the index creation every 32 records
Method Update() class YourAniDlg

call doEvents()

or ApplicationExec (execwhileevent)

to update the screen / animation

return true


---------------

oDlg := YourAniDlg{ self }
oDlg:Show()

...
...

// every 32 Records oDlg:Update() is called
oSrv:SetOrderCondition ( ,,,, { || oDlg:Update() } , 32 ,,,,,,,,,)

oSrv:createOrder (.......)


regards
Karl-Heinz 

[toc] | [prev] | [next] | [standalone]


#11546

From"Paul D B" <pdb@NOMORESPAMhnt.be>
Date2018-04-10 11:37 +0200
Message-ID<pai0ju$r0f$1@dont-email.me>
In reply to#11527
Hi Karl,

Good suggestion that I will keep in mind!

thanks

Paul
"Karl-Heinz"  schreef in bericht news:fikai1Fces8U1@mid.individual.net...

Hi Paul,

> The hourglass will NOT tumble while a file is being re-indexed. When
> skipping to the next re-index however, it will tumble an quarter and then
> be static again while file 2 is being re-indexed and so on.

I´m using Progressbars only, but there would be the same problem: How to
update the progressbar while the index is created ?
This can be achieved by filling the param 5 and 6 of the server method
SetorderCondition().


5. Param <cbEval>

The code block that is evaluated for every record that is processed, or as
specified below. This code block allows the application to intercede during
the order creation, which might be quite lengthy; it might be used to update
the screen, for example, showing progress
on a thermometer-type display or in the status bar.


6. Param <nInterval>

The numeric expression that modifies the number of times <cbEval> is
evaluated. This argument offers a performance enhancement by evaluating the
condition for every nth record instead of for every record ordered.  To step
through every record, specify a value of 0 or omit the parameter.


some dummy code:

//  modeless Dialog
class YourAniDlg inherit Dialogwindow

// This method is called during the index creation every 32 records
Method Update() class YourAniDlg

call doEvents()

or ApplicationExec (execwhileevent)

to update the screen / animation

return true


---------------

oDlg := YourAniDlg{ self }
oDlg:Show()

...
...

// every 32 Records oDlg:Update() is called
oSrv:SetOrderCondition ( ,,,, { || oDlg:Update() } , 32 ,,,,,,,,,)

oSrv:createOrder (.......)


regards
Karl-Heinz 

[toc] | [prev] | [next] | [standalone]


#11526

From"Paul D B" <pdb@NOMORESPAMhnt.be>
Date2018-04-03 15:11 +0200
Message-ID<pa1rj6$iic$1@dont-email.me>
In reply to#11520
OK forget it, I saw that we had already been struggling with this in 2007 
without finding a solution!
https://groups.google.com/d/msg/comp.lang.clipper.visual-objects/cMdn5IOPRRc/zSWpVme9eXAJ

I will use a progressbar.

Paul

"Paul D B"  schreef in bericht news:p9irle$79j$1@dont-email.me...

Hi all,

I'm using some "animation window" (inherets from DialogWindow) that shows an
hourglass and some "Please be patient" stuff. Used it for 15 years!
However in recent Windows versions (8.1 and 10) the hourglass does not
tumble anymore, it is static. And worse: when it is a long lasting or
CPU-intensif operation, Windows changes the caption of the dialog in "Not
responding" which makes some users panic and try to cance it (while they
just have to wait untill the operation finishes).
Anyone has some better animation window, or a suggestion on how to avoid the
apparent freezing?

some code
METHOD PostInit(oParent,uExtra) CLASS AnimateWin

// uExtra is the desired animation

LOCAL cAnimationName AS STRING

cAnimationName := AllTrim(uExtra)

SELF:Melding := " "

// open en speel de animatie

DO CASE

CASE cAnimationName =="HOURGLASS"

SELF:oDCAnimation1:OpenResource(110)

CASE cAnimationName =="SEARCH"

SELF:oDCAnimation1:OpenResource(111)

OTHERWISE

SELF:oDCAnimation1:OpenResource(110) // hourglass

ENDCASE

ApplicationExec(EXECWHILEEVENT)

SELF:oDCAnimation1:Play()

ApplicationExec(EXECWHILEEVENT)

RETURN NIL


thanks

Paul 

[toc] | [prev] | [next] | [standalone]


#11541

From"Jamal" <nospam@example.com>
Date2018-04-09 10:34 -0400
Message-ID<paftlk$blq$1@gioia.aioe.org>
In reply to#11520
Hi Paul,

Regarding the issue of "Not Responding", try the following:

_DLL FUNCTION DisableProcessWindowsGhosting() as void 
PASCAL:USER32.DisableProcessWindowsGhosting

Just call DisableProcessWindowsGhosting() one time in the Start() method of 
your app.

Let me know how it goes.

Jamal


"Paul D B"  wrote in message news:p9irle$79j$1@dont-email.me...

Hi all,

I'm using some "animation window" (inherets from DialogWindow) that shows an
hourglass and some "Please be patient" stuff. Used it for 15 years!
However in recent Windows versions (8.1 and 10) the hourglass does not
tumble anymore, it is static. And worse: when it is a long lasting or
CPU-intensif operation, Windows changes the caption of the dialog in "Not
responding" which makes some users panic and try to cance it (while they
just have to wait untill the operation finishes).
Anyone has some better animation window, or a suggestion on how to avoid the
apparent freezing?

some code
METHOD PostInit(oParent,uExtra) CLASS AnimateWin

// uExtra is the desired animation

LOCAL cAnimationName AS STRING

cAnimationName := AllTrim(uExtra)

SELF:Melding := " "

// open en speel de animatie

DO CASE

CASE cAnimationName =="HOURGLASS"

SELF:oDCAnimation1:OpenResource(110)

CASE cAnimationName =="SEARCH"

SELF:oDCAnimation1:OpenResource(111)

OTHERWISE

SELF:oDCAnimation1:OpenResource(110) // hourglass

ENDCASE

ApplicationExec(EXECWHILEEVENT)

SELF:oDCAnimation1:Play()

ApplicationExec(EXECWHILEEVENT)

RETURN NIL


thanks

Paul 

[toc] | [prev] | [next] | [standalone]


#11545

From"Paul D B" <pdb@NOMORESPAMhnt.be>
Date2018-04-10 11:35 +0200
Message-ID<pai0gm$qfj$1@dont-email.me>
In reply to#11541
Hi Jamal,

does not make any difference for the animation  not playing, but it should 
avoid the "not responding" problem.

"DisableProcessWindowsGhosting function
Disables the window ghosting feature for the calling GUI process. Window 
ghosting is a Windows Manager feature that lets the user minimize, move, or 
close the main window of an application that is not responding."

Thanks for the suggestion


Paul
"Jamal"  schreef in bericht news:paftlk$blq$1@gioia.aioe.org...

Hi Paul,

Regarding the issue of "Not Responding", try the following:

_DLL FUNCTION DisableProcessWindowsGhosting() as void
PASCAL:USER32.DisableProcessWindowsGhosting

Just call DisableProcessWindowsGhosting() one time in the Start() method of
your app.

Let me know how it goes.

Jamal


"Paul D B"  wrote in message news:p9irle$79j$1@dont-email.me...

Hi all,

I'm using some "animation window" (inherets from DialogWindow) that shows an
hourglass and some "Please be patient" stuff. Used it for 15 years!
However in recent Windows versions (8.1 and 10) the hourglass does not
tumble anymore, it is static. And worse: when it is a long lasting or
CPU-intensif operation, Windows changes the caption of the dialog in "Not
responding" which makes some users panic and try to cance it (while they
just have to wait untill the operation finishes).
Anyone has some better animation window, or a suggestion on how to avoid the
apparent freezing?

some code
METHOD PostInit(oParent,uExtra) CLASS AnimateWin

// uExtra is the desired animation

LOCAL cAnimationName AS STRING

cAnimationName := AllTrim(uExtra)

SELF:Melding := " "

// open en speel de animatie

DO CASE

CASE cAnimationName =="HOURGLASS"

SELF:oDCAnimation1:OpenResource(110)

CASE cAnimationName =="SEARCH"

SELF:oDCAnimation1:OpenResource(111)

OTHERWISE

SELF:oDCAnimation1:OpenResource(110) // hourglass

ENDCASE

ApplicationExec(EXECWHILEEVENT)

SELF:oDCAnimation1:Play()

ApplicationExec(EXECWHILEEVENT)

RETURN NIL


thanks

Paul 

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.clipper.visual-objects


csiph-web