Wrong DesktopWidth ()/DesktopHeight () returns
Wrong DesktopWidth ()/DesktopHeight () returns
Last edited by es_91 on Tue Oct 28, 2014 10:49 am, edited 1 time in total.

Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
We use regular API command, so it's probably a VMWare issue. We don't support report in virtual machines, as it's just emulation and it can have its own flaws.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Switch VMware display mode to Full Screen and you will get the right answer
Egypt my love
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Try a different VM (VirtualBox or whatever) to verify that it is VMware and not your own code. If it is not your own code report the bug to the manufacturer of VMware.
I just verified and I have NO issue on VirtualBox.
I just verified and I have NO issue on VirtualBox.
( PB6.00 LTS Win11 x64 Asrock AB350 Pro4 Ryzen 5 3600 32GB GTX1060 6GB)
( The path to enlightenment and the PureBasic Survival Guide right here... )
( The path to enlightenment and the PureBasic Survival Guide right here... )
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
As I said in the other thread, I have checked and have no such issue with VMware Player.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
I can not double check the error in my personal pc at home, but i found another anomaly:
When a program is executed in compatibility mode with a resolution of 640x480, the screen is practically set to 640x480, but DesktopWidth() and DesktopHeight() return both the value of the before-set screen resolution (e.g. 800x600).
Should that be wrong?
When a program is executed in compatibility mode with a resolution of 640x480, the screen is practically set to 640x480, but DesktopWidth() and DesktopHeight() return both the value of the before-set screen resolution (e.g. 800x600).
Should that be wrong?

Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
> When a program is executed in compatibility mode [...]
Do you mean in VMware, or on a real PC?
Do you mean in VMware, or on a real PC?
I compile using 5.31 (x86) on Win 7 Ultimate (64-bit).
"PureBasic won't be object oriented, period" - Fred.
"PureBasic won't be object oriented, period" - Fred.
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
I mean, on a real PC.
I can also use the Windows' ability to select smaller resolutions than 800x600 ONCE the compatibility mode-program has started (before the smaller resolutions should not be visible in your Display Settings) and it ALSO is not recognized in PureBasic's DesktopWidth() and DesktopHeight() functions (those still Show 800x600 or higher).
... Fred?
I can also use the Windows' ability to select smaller resolutions than 800x600 ONCE the compatibility mode-program has started (before the smaller resolutions should not be visible in your Display Settings) and it ALSO is not recognized in PureBasic's DesktopWidth() and DesktopHeight() functions (those still Show 800x600 or higher).
... Fred?


Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
As previously said, we use standard Windows function for this: EnumDisplaySettings_(). Feel free to toy with it and if you find something odd, please post it
.

Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Hi, Fred. Nice, that you take care of this. 
I toyed around with the EnumDisplaySettings_ () function, as you said, and i found that the values returned by it are correct, even when the compatibility mode with less than 800x600 Pixels is on.
Please see the following screen:

Notice that the image's resolution is 640x480, so the first two values are correct, PureBasic's functions return wrong.

I toyed around with the EnumDisplaySettings_ () function, as you said, and i found that the values returned by it are correct, even when the compatibility mode with less than 800x600 Pixels is on.
Please see the following screen:

Notice that the image's resolution is 640x480, so the first two values are correct, PureBasic's functions return wrong.

Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Oh, I am facing a different kind of problem here. It seems on the network PC I am on the DesktopWidth() and DesktopHeight() values are always 800x600, no matter what resolution i set up in the Display Settings.
Again, we're not working with VMware anymore, here!
What the heck is this?
Again, we're not working with VMware anymore, here!
What the heck is this?

Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Did you use ExamineDesktop() before DesktopWidth/Height() ?
Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
Sure.
Last edited by es_91 on Thu Oct 23, 2014 6:14 am, edited 1 time in total.

Re: [Bug] Wrong DesktopWidth/DesktopHeight() returns in VMwa
I found the mistake.
My PC has two desktops:

My PC has two desktops:
Code: Select all
Debug ExamineDesktops ()
The #Null desktop was not the visible one. I do not know why my PC has two desktops, it must have something to do with the fact that it's a controlled network PC, propably a MasterEye problem or whatever. Because strangely the Display Settings show only one display/desktop (see below).PB Debugger wrote:2
Code: Select all
Debug DesktopName (#Null)
PB Debugger wrote:\\.\DISPLAYV4
System Setting's desktop drop-down menu wrote:PLE481
