Hey friends!
Hope you are all doing fine and C19 does not bite you!
Got this issue: I found out that some code that I wrote which resizes a window depending on how much dynamic data (a list) is shown
- works well on Windows 7
- but totally screws up the display on Windows 10
I have melted down the issue to be related to the command "ResizeWindow()". Everything else works well.
Before I begin the discussion I wish to ask: Is this a known bug?
ResizeWindow() - a known issue with Windows 10?
-
- Enthusiast
- Posts: 169
- Joined: Sat Mar 14, 2015 11:53 am
Re: ResizeWindow() - a known issue with Windows 10?
Short: No.StarWarsFan wrote:Is this a known bug?
Long: We need to see some code.
-
- Enthusiast
- Posts: 169
- Joined: Sat Mar 14, 2015 11:53 am
Re: ResizeWindow() - a known issue with Windows 10?
Hey Barry! Nice to see you again!
Okay, then let me get home and post some code (Got that code at home on laptop).
Okay, then let me get home and post some code (Got that code at home on laptop).
Re: ResizeWindow() - a known issue with Windows 10?
Please only post executable code that is as short as possible and with which we can reproduce your problem.StarWarsFan wrote:Okay, then let me get home and post some code
Hygge
-
- Enthusiast
- Posts: 169
- Joined: Sat Mar 14, 2015 11:53 am
Re: ResizeWindow() - a known issue with Windows 10?
I was experimenting with ResizeWindow() to display a little "window-animation". Enlarging the window to show more data.
This works fine under Win7, it does not on Win10.
The code that I use on Win7 is:
Again: The astonishing thing is that this little "animation" works as desired on Win7, but on Win10 it just won't.
This works fine under Win7, it does not on Win10.
The code that I use on Win7 is:
Code: Select all
scrollREIN: ;- scrollREIN
summe=0
For x= 1 To 5 : ResizeWindow(#main,WindowX(#main)-1,#PB_Ignore,WindowWidth(#main)+1,#PB_Ignore) : Mydelay(10) : Next : summe +x*1
For x= 1 To 6 : ResizeWindow(#main,WindowX(#main)-2,#PB_Ignore,WindowWidth(#main)+2,#PB_Ignore) : Mydelay(10) : Next : summe +x*2
For x= 1 To 8 : ResizeWindow(#main,WindowX(#main)-4,#PB_Ignore,WindowWidth(#main)+4,#PB_Ignore) : Mydelay(10) : Next : summe +x*4
For x= 1 To 25: ResizeWindow(#main,WindowX(#main)-5,#PB_Ignore,WindowWidth(#main)+5,#PB_Ignore) : Mydelay(10) : Next : summe +x*5
For x= 1 To 8 : ResizeWindow(#main,WindowX(#main)-4,#PB_Ignore,WindowWidth(#main)+4,#PB_Ignore) : Mydelay(10) : Next : summe +x*4
For x= 1 To 6 : ResizeWindow(#main,WindowX(#main)-2,#PB_Ignore,WindowWidth(#main)+2,#PB_Ignore) : Mydelay(10) : Next : summe +x*2
For x= 1 To 5 : ResizeWindow(#main,WindowX(#main)-1,#PB_Ignore,WindowWidth(#main)+1,#PB_Ignore) : Mydelay(10) : Next : summe +x*1
Return
scrollRAUS: ;- scrollRAUS
summe=0
For x= 1 To 5 : ResizeWindow(#main,WindowX(#main)+1,#PB_Ignore,WindowWidth(#main)-1,#PB_Ignore) : Mydelay(10) : Next : summe +x*1
For x= 1 To 6 : ResizeWindow(#main,WindowX(#main)+2,#PB_Ignore,WindowWidth(#main)-2,#PB_Ignore) : Mydelay(10) : Next : summe +x*2
For x= 1 To 8 : ResizeWindow(#main,WindowX(#main)+4,#PB_Ignore,WindowWidth(#main)-4,#PB_Ignore) : Mydelay(10) : Next : summe +x*4
For x= 1 To 25: ResizeWindow(#main,WindowX(#main)+5,#PB_Ignore,WindowWidth(#main)-5,#PB_Ignore) : Mydelay(10) : Next : summe +x*5
For x= 1 To 8 : ResizeWindow(#main,WindowX(#main)+4,#PB_Ignore,WindowWidth(#main)-4,#PB_Ignore) : Mydelay(10) : Next : summe +x*4
For x= 1 To 6 : ResizeWindow(#main,WindowX(#main)+2,#PB_Ignore,WindowWidth(#main)-2,#PB_Ignore) : Mydelay(10) : Next : summe +x*2
For x= 1 To 5 : ResizeWindow(#main,WindowX(#main)+1,#PB_Ignore,WindowWidth(#main)-1,#PB_Ignore) : Mydelay(10) : Next : summe +x*1
Return
- netmaestro
- PureBasic Bullfrog
- Posts: 8433
- Joined: Wed Jul 06, 2005 5:42 am
- Location: Fort Nelson, BC, Canada
Re: ResizeWindow() - a known issue with Windows 10?
Seems to work here on Windows 10:
Code: Select all
Procedure MyDelay(val.i)
While WindowEvent():Wend
Delay(val)
EndProcedure
#main=0
OpenWindow(0,0,0,640,480,"",#PB_Window_ScreenCentered|#PB_Window_SystemMenu)
Gosub scrollrein
Repeat:Until WaitWindowEvent()=#PB_Event_CloseWindow
End
scrollREIN: ;- scrollREIN
summe=0
For x= 1 To 5 : ResizeWindow(#main,WindowX(#main)-1,#PB_Ignore,WindowWidth(#main)+1,#PB_Ignore) : MyDelay(10) : Next : summe +x*1
For x= 1 To 6 : ResizeWindow(#main,WindowX(#main)-2,#PB_Ignore,WindowWidth(#main)+2,#PB_Ignore) : MyDelay(10) : Next : summe +x*2
For x= 1 To 8 : ResizeWindow(#main,WindowX(#main)-4,#PB_Ignore,WindowWidth(#main)+4,#PB_Ignore) : MyDelay(10) : Next : summe +x*4
For x= 1 To 25: ResizeWindow(#main,WindowX(#main)-5,#PB_Ignore,WindowWidth(#main)+5,#PB_Ignore) : MyDelay(10) : Next : summe +x*5
For x= 1 To 8 : ResizeWindow(#main,WindowX(#main)-4,#PB_Ignore,WindowWidth(#main)+4,#PB_Ignore) : MyDelay(10) : Next : summe +x*4
For x= 1 To 6 : ResizeWindow(#main,WindowX(#main)-2,#PB_Ignore,WindowWidth(#main)+2,#PB_Ignore) : MyDelay(10) : Next : summe +x*2
For x= 1 To 5 : ResizeWindow(#main,WindowX(#main)-1,#PB_Ignore,WindowWidth(#main)+1,#PB_Ignore) : MyDelay(10) : Next : summe +x*1
Return
BERESHEIT
-
- Enthusiast
- Posts: 169
- Joined: Sat Mar 14, 2015 11:53 am
Re: ResizeWindow() - a known issue with Windows 10?
That is very astonishing, if not surprising.
The only difference appers to be the delay procedure, I used
Procedure MyDelay(Delay)
Timer= ElapsedMilliseconds() : Repeat : WaitWindowEvent(1) : Until ElapsedMilliseconds()-Timer >= Delay
EndProcedure
=> Did NOT work on Win10 properly
You used:
Procedure MyDelay(val.i)
While WindowEvent():Wend
Delay(val)
EndProcedure
=> Will now test on my second PC
But can anyone explain in detail where exactly I went wrong with my routine? I want to learn!
The only difference appers to be the delay procedure, I used
Procedure MyDelay(Delay)
Timer= ElapsedMilliseconds() : Repeat : WaitWindowEvent(1) : Until ElapsedMilliseconds()-Timer >= Delay
EndProcedure
=> Did NOT work on Win10 properly
You used:
Procedure MyDelay(val.i)
While WindowEvent():Wend
Delay(val)
EndProcedure
=> Will now test on my second PC
But can anyone explain in detail where exactly I went wrong with my routine? I want to learn!
Re: ResizeWindow() - a known issue with Windows 10?
Alternative für OS Windows show AnimateWindow
Link: https://docs.microsoft.com/en-us/window ... matewindow
Link: https://docs.microsoft.com/en-us/window ... matewindow
My Projects ThreadToGUI / OOP-BaseClass / EventDesigner V3
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive
PB v3.30 / v5.75 - OS Mac Mini OSX 10.xx - VM Window Pro / Linux Ubuntu
Downloads on my Webspace / OneDrive