[PB5.62] Window Width limited to 1380

Just starting out? Need help? Post your questions and find answers here.
User avatar
marcoagpinto
Addict
Addict
Posts: 939
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

[PB5.62] Window Width limited to 1380

Post by marcoagpinto »

Hello!

Code: Select all

If OpenWindow(0,0,0,1440,600,"Proofing Tool GUI",#PB_Window_SystemMenu | #PB_Window_MinimizeGadget | #PB_Window_ScreenCentered)=#False : MessageRequester("Error", "Can't open a window.", #PB_MessageRequester_Error) : EndIf

Debug WindowWidth(0)
The window doesn't open with a width of 1440 (Standard HD).

Tested with PB x64.

Not sure if this happens because my screen size is 1366x768, but it shouldn't matter.

I am planning to use higher sizes for people with Full-HD.
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: [PB5.62] Window Width limited to 1380

Post by Josh »

No bug.

I can only talk about Windows and it is a standard behavior that a window cannot be larger than the screen. Try to enlarge any window with the mouse bigger than the screen. Won't work either.

Maybe you could do something with SetWindowPos_(), but this has nothing to do with the fact that Pb's behavior is correct.
sorry for my bad english
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Re: [PB5.62] Window Width limited to 1380

Post by nco2k »

use WindowBounds().

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: [PB5.62] Window Width limited to 1380

Post by Dude »

Josh wrote:it is a standard behavior that a window cannot be larger than the screen. Try to enlarge any window with the mouse bigger than the screen. Won't work either.
Actually, that's wrong. If I drag a window off the left edge of the screen so that only its right half is visible, I can then drag its right edge to the right to make the window wider than the screen. Sure, not all of the window is now visible at once, but the end result is that the window is wider than the screen.

What nco2k said is also correct:

Code: Select all

OpenWindow(0,0,0,2000,1000,"test")
WindowBounds(0,2000,1000,#PB_Ignore,#PB_Ignore)
Debug WindowWidth(0) ; Returns 2000
Debug WindowHeight(0) ; Returns 1000
Repeat : Until WaitWindowEvent()=#PB_Event_CloseWindow
BTW, this thread is not a bug. ;)
User avatar
marcoagpinto
Addict
Addict
Posts: 939
Joined: Sun Mar 10, 2013 3:01 pm
Location: Portugal
Contact:

Re: [PB5.62] Window Width limited to 1380

Post by marcoagpinto »

Thanks, it has worked.

Could someone move the thread to coding questions?
User avatar
Andre
PureBasic Team
PureBasic Team
Posts: 2056
Joined: Fri Apr 25, 2003 6:14 pm
Location: Germany (Saxony, Deutscheinsiedel)
Contact:

Re: [PB5.62] Window Width limited to 1380

Post by Andre »

marcoagpinto wrote: Could someone move the thread to coding questions?
Done :D
Bye,
...André
(PureBasicTeam::Docs & Support - PureArea.net | Order:: PureBasic | PureVisionXP)
User avatar
Josh
Addict
Addict
Posts: 1183
Joined: Sat Feb 13, 2010 3:45 pm

Re: [PB5.62] Window Width limited to 1380

Post by Josh »

Dude wrote:Actually, that's wrong. If I drag a window off the left edge of the screen so that only its right half is visible, I can then drag its right edge to the right to make the window wider than the screen. Sure, not all of the window is now visible at once, but the end result is that the window is wider than the screen.
Definitely no, at least on Win7 and I'm almost certain that this was not the case with earlier versions of Windows. Win8 and later versions I know too little.

Maybe you have installed several screens.
sorry for my bad english
Dude
Addict
Addict
Posts: 1907
Joined: Mon Feb 16, 2015 2:49 pm

Re: [PB5.62] Window Width limited to 1380

Post by Dude »

@Josh, I stand corrected -- if I try to resize Notepad or Paint Shop Pro to wider than my single monitor width, it doesn't work.

BUT, when I posted above that it does work, it's because I was resizing one of my PureBasic apps, which does let me resize it to be wider than my single monitor width. I since discovered that it was due to using WindowBounds() in an IncludeFile that I forgot about. :lol:
Post Reply