• IndexBar:Advance yelds "Window is not responding"

    From Grzegorz R.@21:1/5 to All on Tue Sep 6 02:56:02 2022
    Hi Friends
    MS has changed something in system because what in XP and earlier W10 worked fine - now does not work.
    I have a progress window with progress bar(s) that should advance according to process run (like searching for the data).
    It always worked fin but since spring this year it doe NOT work any more ie very often (nearly always) i get message "window not respoding" and progressbar stops although process runs and finishes.
    I tried to use quasitimer (save and compare seconds()) to "advance" only once per second (even if more "ticks"/advances happened) but it didn't help.
    How can I keep my progressbar working without freezing the window?
    I can show my code but there is nothing much.

    Any help highly aprreciated

    Gregory

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jamal@21:1/5 to Grzegorz R. on Tue Sep 6 14:01:45 2022
    Hi Gregory!

    As a programmer (you and others), to get help from fellow programmers, I suggest that you always provide more information. Do not assume we know
    your exact development/runtime environment.

    1. Complete VO Version.
    2. Windows Version.
    3. Post reproducible code.

    Jamal

    On 9/6/2022 5:56 AM, Grzegorz R. wrote:
    Hi Friends
    MS has changed something in system because what in XP and earlier W10 worked fine - now does not work.
    I have a progress window with progress bar(s) that should advance according to process run (like searching for the data).
    It always worked fin but since spring this year it doe NOT work any more ie very often (nearly always) i get message "window not respoding" and progressbar stops although process runs and finishes.
    I tried to use quasitimer (save and compare seconds()) to "advance" only once per second (even if more "ticks"/advances happened) but it didn't help.
    How can I keep my progressbar working without freezing the window?
    I can show my code but there is nothing much.

    Any help highly aprreciated

    Gregory

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Grzegorz R.@21:1/5 to All on Tue Sep 6 23:49:46 2022
    wtorek, 6 września 2022 o 20:02:04 UTC+2 Jamal napisał(a):
    Hi Gregory!

    As a programmer (you and others), to get help from fellow programmers, I suggest that you always provide more information. Do not assume we know
    your exact development/runtime environment.

    1. Complete VO Version.
    2. Windows Version.
    3. Post reproducible code.

    Jamal
    On 9/6/2022 5:56 AM, Grzegorz R. wrote:
    Hi Friends
    MS has changed something in system because what in XP and earlier W10 worked fine - now does not work.
    I have a progress window with progress bar(s) that should advance according to process run (like searching for the data).
    It always worked fin but since spring this year it doe NOT work any more ie very often (nearly always) i get message "window not respoding" and progressbar stops although process runs and finishes.
    I tried to use quasitimer (save and compare seconds()) to "advance" only once per second (even if more "ticks"/advances happened) but it didn't help.
    How can I keep my progressbar working without freezing the window?
    I can show my code but there is nothing much.

    Any help highly aprreciated

    Gregory
    Hello Jamal
    I'm sorry...
    VO2.8SP4b + Win10 21H2 19044.1889

    Code is simple:
    OknoPostepu (ProgressWin) inherited from DialogWindow created from toolbar
    that has
    IndexBar as ProgressBar

    code from VO

    RESOURCE OknoPostepu DIALOGEX 5, 19, 260, 45
    STYLE DS_3DLOOK|WS_POPUP|WS_CAPTION|WS_SYSMENU
    FONT 8, "MS Shell Dlg"
    BEGIN
    CONTROL "Indeksowanie", OKNOPOSTEPU_INDEXBAR, "msctls_progress32", WS_CHILD, 8, 7, 244, 11
    END

    CLASS OknoPostepu INHERIT DIALOGWINDOW
    PROTECT oDCIndexBar AS PROGRESSBAR
    //{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)

    METHOD Advance() CLASS OknoPostepu
    SELF:oDCIndexBar:Advance(1)
    RETURN NIL

    METHOD EndWin() CLASS OknoPostepu
    SELF:EndDialog()
    RETURN NIL

    METHOD Init(oParent,uExtra) CLASS OknoPostepu
    SELF:PreInit(oParent,uExtra) SUPER:Init(oParent,ResourceID{"OknoPostepu",_GetInst()},FALSE)
    oDCIndexBar := ProgressBar{SELF,ResourceID{OKNOPOSTEPU_INDEXBAR,_GetInst()}} oDCIndexBar:HyperLabel := HyperLabel{#IndexBar,"Indeksowanie",NULL_STRING,NULL_STRING}
    oDCIndexBar:Range := Range{0,23}
    SELF:Caption := ""
    SELF:HyperLabel :=HyperLabel{#OknoPostepu,NULL_STRING,NULL_STRING,NULL_STRING} SELF:PostInit(oParent,uExtra)
    RETURN SELF

    STATIC DEFINE OKNOPOSTEPU_INDEXBAR := 100


    and in main program loop

    FOR Rec := 1 to 10
    //do something
    OknoPostepu:Advance()
    NEXT

    Just like that - nothing very special.
    Regards
    Gregory

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Massimo Bighelli@21:1/5 to All on Wed Sep 7 16:55:16 2022
    try add ProcessEvent after your Advance
    (I do not recall the exact sintax because I do not use VO since 2012)

    Massimo


    Il 07/09/2022 08:49, Grzegorz R. ha scritto:
    wtorek, 6 września 2022 o 20:02:04 UTC+2 Jamal napisał(a):
    Hi Gregory!

    As a programmer (you and others), to get help from fellow programmers, I
    suggest that you always provide more information. Do not assume we know
    your exact development/runtime environment.

    1. Complete VO Version.
    2. Windows Version.
    3. Post reproducible code.

    Jamal
    On 9/6/2022 5:56 AM, Grzegorz R. wrote:
    Hi Friends
    MS has changed something in system because what in XP and earlier W10 worked fine - now does not work.
    I have a progress window with progress bar(s) that should advance according to process run (like searching for the data).
    It always worked fin but since spring this year it doe NOT work any more ie very often (nearly always) i get message "window not respoding" and progressbar stops although process runs and finishes.
    I tried to use quasitimer (save and compare seconds()) to "advance" only once per second (even if more "ticks"/advances happened) but it didn't help.
    How can I keep my progressbar working without freezing the window?
    I can show my code but there is nothing much.

    Any help highly aprreciated

    Gregory
    Hello Jamal
    I'm sorry...
    VO2.8SP4b + Win10 21H2 19044.1889

    Code is simple:
    OknoPostepu (ProgressWin) inherited from DialogWindow created from toolbar that has
    IndexBar as ProgressBar

    code from VO

    RESOURCE OknoPostepu DIALOGEX 5, 19, 260, 45
    STYLE DS_3DLOOK|WS_POPUP|WS_CAPTION|WS_SYSMENU
    FONT 8, "MS Shell Dlg"
    BEGIN
    CONTROL "Indeksowanie", OKNOPOSTEPU_INDEXBAR, "msctls_progress32", WS_CHILD, 8, 7, 244, 11
    END

    CLASS OknoPostepu INHERIT DIALOGWINDOW
    PROTECT oDCIndexBar AS PROGRESSBAR
    //{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)

    METHOD Advance() CLASS OknoPostepu
    SELF:oDCIndexBar:Advance(1)
    RETURN NIL

    METHOD EndWin() CLASS OknoPostepu
    SELF:EndDialog()
    RETURN NIL

    METHOD Init(oParent,uExtra) CLASS OknoPostepu
    SELF:PreInit(oParent,uExtra) SUPER:Init(oParent,ResourceID{"OknoPostepu",_GetInst()},FALSE)
    oDCIndexBar := ProgressBar{SELF,ResourceID{OKNOPOSTEPU_INDEXBAR,_GetInst()}} oDCIndexBar:HyperLabel := HyperLabel{#IndexBar,"Indeksowanie",NULL_STRING,NULL_STRING}
    oDCIndexBar:Range := Range{0,23}
    SELF:Caption := ""
    SELF:HyperLabel :=HyperLabel{#OknoPostepu,NULL_STRING,NULL_STRING,NULL_STRING}
    SELF:PostInit(oParent,uExtra)
    RETURN SELF

    STATIC DEFINE OKNOPOSTEPU_INDEXBAR := 100


    and in main program loop

    FOR Rec := 1 to 10
    //do something
    OknoPostepu:Advance()
    NEXT

    Just like that - nothing very special.
    Regards
    Gregory


    *Massimo Bighelli* ARCA Sistemi S.r.l.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jamal@21:1/5 to Grzegorz R. on Wed Sep 7 11:00:56 2022
    Add ApplicationExec( EXECWHILEEVENT ) in your loop.

    There is a problem with VO 2.8 and progressbar Range with large values.
    Might as well add the following to your app:

    ASSIGN Range32( oRange32 ) CLASS ProgressBar
    LOCAL liMin as dword
    LOCAL liMax AS LONG
    liMin := oRange32:Min
    liMax := long(oRange32:Max)
    SendMessage(SELF:Handle(), PBM_SETRANGE32,liMin,liMax )
    RETURN SELF:oRange := oRange32



    ACCESS Range32() CLASS ProgressBar
    RETURN oRange


    Then set oDCIndexBar:Range32 := Range{0,23} in the PostInit(..) method
    or Button click method.




    Jamal

    On 9/7/2022 2:49 AM, Grzegorz R. wrote:
    wtorek, 6 września 2022 o 20:02:04 UTC+2 Jamal napisał(a):
    Hi Gregory!

    As a programmer (you and others), to get help from fellow programmers, I
    suggest that you always provide more information. Do not assume we know
    your exact development/runtime environment.

    1. Complete VO Version.
    2. Windows Version.
    3. Post reproducible code.

    Jamal
    On 9/6/2022 5:56 AM, Grzegorz R. wrote:
    Hi Friends
    MS has changed something in system because what in XP and earlier W10 worked fine - now does not work.
    I have a progress window with progress bar(s) that should advance according to process run (like searching for the data).
    It always worked fin but since spring this year it doe NOT work any more ie very often (nearly always) i get message "window not respoding" and progressbar stops although process runs and finishes.
    I tried to use quasitimer (save and compare seconds()) to "advance" only once per second (even if more "ticks"/advances happened) but it didn't help.
    How can I keep my progressbar working without freezing the window?
    I can show my code but there is nothing much.

    Any help highly aprreciated

    Gregory
    Hello Jamal
    I'm sorry...
    VO2.8SP4b + Win10 21H2 19044.1889

    Code is simple:
    OknoPostepu (ProgressWin) inherited from DialogWindow created from toolbar that has
    IndexBar as ProgressBar

    code from VO

    RESOURCE OknoPostepu DIALOGEX 5, 19, 260, 45
    STYLE DS_3DLOOK|WS_POPUP|WS_CAPTION|WS_SYSMENU
    FONT 8, "MS Shell Dlg"
    BEGIN
    CONTROL "Indeksowanie", OKNOPOSTEPU_INDEXBAR, "msctls_progress32", WS_CHILD, 8, 7, 244, 11
    END

    CLASS OknoPostepu INHERIT DIALOGWINDOW
    PROTECT oDCIndexBar AS PROGRESSBAR
    //{{%UC%}} USER CODE STARTS HERE (do NOT remove this line)

    METHOD Advance() CLASS OknoPostepu
    SELF:oDCIndexBar:Advance(1)
    RETURN NIL

    METHOD EndWin() CLASS OknoPostepu
    SELF:EndDialog()
    RETURN NIL

    METHOD Init(oParent,uExtra) CLASS OknoPostepu
    SELF:PreInit(oParent,uExtra) SUPER:Init(oParent,ResourceID{"OknoPostepu",_GetInst()},FALSE)
    oDCIndexBar := ProgressBar{SELF,ResourceID{OKNOPOSTEPU_INDEXBAR,_GetInst()}} oDCIndexBar:HyperLabel := HyperLabel{#IndexBar,"Indeksowanie",NULL_STRING,NULL_STRING}
    oDCIndexBar:Range := Range{0,23}
    SELF:Caption := ""
    SELF:HyperLabel :=HyperLabel{#OknoPostepu,NULL_STRING,NULL_STRING,NULL_STRING}
    SELF:PostInit(oParent,uExtra)
    RETURN SELF

    STATIC DEFINE OKNOPOSTEPU_INDEXBAR := 100


    and in main program loop

    FOR Rec := 1 to 10
    //do something
    OknoPostepu:Advance()
    NEXT

    Just like that - nothing very special.
    Regards
    Gregory

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)