It is currently Fri Feb 26, 2021 8:30 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: ResizeWindow() - a known issue with Windows 10?
PostPosted: Thu Jun 04, 2020 11:15 am 
Offline
User
User

Joined: Sat Mar 14, 2015 11:53 am
Posts: 84
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?

_________________
There's usually a lot of "try this, do that" but ONLY an example source that one can test for themself and get an immediate result brings people forward.


Top
 Profile  
Reply with quote  
 Post subject: Re: ResizeWindow() - a known issue with Windows 10?
PostPosted: Thu Jun 04, 2020 11:51 am 
Offline
Addict
Addict

Joined: Thu Apr 18, 2019 8:17 am
Posts: 1301
StarWarsFan wrote:
Is this a known bug?

Short: No.
Long: We need to see some code.


Top
 Profile  
Reply with quote  
 Post subject: Re: ResizeWindow() - a known issue with Windows 10?
PostPosted: Thu Jun 04, 2020 11:57 am 
Offline
User
User

Joined: Sat Mar 14, 2015 11:53 am
Posts: 84
Hey Barry! Nice to see you again!

Okay, then let me get home and post some code (Got that code at home on laptop).

_________________
There's usually a lot of "try this, do that" but ONLY an example source that one can test for themself and get an immediate result brings people forward.


Top
 Profile  
Reply with quote  
 Post subject: Re: ResizeWindow() - a known issue with Windows 10?
PostPosted: Thu Jun 04, 2020 12:11 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Mar 02, 2004 1:20 pm
Posts: 1173
Location: Amphibios 9
StarWarsFan wrote:
Okay, then let me get home and post some code

Please only post executable code that is as short as possible and with which we can reproduce your problem.

_________________
Hygge


Top
 Profile  
Reply with quote  
 Post subject: Re: ResizeWindow() - a known issue with Windows 10?
PostPosted: Fri Jun 05, 2020 1:19 pm 
Offline
User
User

Joined: Sat Mar 14, 2015 11:53 am
Posts: 84
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:
Code:
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


Again: The astonishing thing is that this little "animation" works as desired on Win7, but on Win10 it just won't.

_________________
There's usually a lot of "try this, do that" but ONLY an example source that one can test for themself and get an immediate result brings people forward.


Top
 Profile  
Reply with quote  
 Post subject: Re: ResizeWindow() - a known issue with Windows 10?
PostPosted: Mon Jun 08, 2020 7:24 pm 
Offline
PureBasic Bullfrog
PureBasic Bullfrog
User avatar

Joined: Wed Jul 06, 2005 5:42 am
Posts: 8149
Location: Fort Nelson, BC, Canada
Seems to work here on Windows 10:
Code:
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

_________________
BERISHEET


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye