If ExamineDesktops()
ScreenX = DesktopWidth(0)
ScreenY = DesktopHeight(0)
ScreenD = DesktopDepth(0)
ScreenF = DesktopFrequency(0)
EndIf
Debug ScreenX
Produces an error on the first line.....
[14:48:25] [ERROR] ExamineDesktops() must be called before another Desktop function.
Why is this when the If statement IS calling the procedure before the other functions ?
ExamineDesktops() error
- DigitalDreams
- User
- Posts: 18
- Joined: Mon Oct 30, 2023 10:50 pm
Re: ExamineDesktops() error
2nd version produces the same error on line 1 !
DeskNum=ExamineDesktops()
If DeskNum
ScreenX = DesktopWidth(0)
ScreenY = DesktopHeight(0)
ScreenD = DesktopDepth(0)
ScreenF = DesktopFrequency(0)
EndIf
Debug ScreenX
DeskNum=ExamineDesktops()
If DeskNum
ScreenX = DesktopWidth(0)
ScreenY = DesktopHeight(0)
ScreenD = DesktopDepth(0)
ScreenF = DesktopFrequency(0)
EndIf
Debug ScreenX
Re: ExamineDesktops() error
Which OS and PB version.
Its works here ...
Please use code tags of forum
Its works here ...
Please use code tags of forum
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
- DigitalDreams
- User
- Posts: 18
- Joined: Mon Oct 30, 2023 10:50 pm
Re: ExamineDesktops() error
windows 10 22H2mk-soft wrote: Tue Oct 31, 2023 4:21 pm Which OS and PB version.
Its works here ...
Please use code tags of forum
PureBasic 6.03 LTS (Windows - x64)
Code tags ?
Re: ExamineDesktops() error
What OS are you using?
Version of PB?
Are you running a virtual machine?
Those are needed to answer your questions accurately.
This code is so basic that it should work. Unless you do not have a screen or your computer is infected with a virus.
Try this code
In a lighter note, I feel spam posts are getting help with artificial inteligence.
Norm.
Version of PB?
Are you running a virtual machine?
Those are needed to answer your questions accurately.
This code is so basic that it should work. Unless you do not have a screen or your computer is infected with a virus.
Try this code
Code: Select all
Debug ExamineDesktops() ; is there at least 1 screen?
Debug 1+0 ; is debug even on?
In a lighter note, I feel spam posts are getting help with artificial inteligence.
Code: Select all
If ExamineDesktops()
ScreenX = DesktopWidth(0)
ScreenY = DesktopHeight(0)
ScreenD = DesktopDepth(0)
ScreenF = DesktopFrequency(0)
EndIf
Debug ScreenX
debug d ; <----------- this should not be 4 unless you assigned 4 to 'd' somewhere else.
; If you are not using 'd' anywhere why would you debug 'd'?
Norm.
google Translate;Makes my jokes fall flat- Fait mes blagues tombent à plat- Machte meine Witze verpuffen- Eh cumpari ci vo sunari
- DigitalDreams
- User
- Posts: 18
- Joined: Mon Oct 30, 2023 10:50 pm
Re: ExamineDesktops() error
First line generates a 1 in debug screennormeus wrote: Tue Oct 31, 2023 4:42 pm What OS are you using?
Version of PB?
Are you running a virtual machine?
Those are needed to answer your questions accurately.
This code is so basic that it should work. Unless you do not have a screen or your computer is infected with a virus.
Try this codeNorm.Code: Select all
Debug ExamineDesktops() ; is there at least 1 screen? Debug 1+0 ; is debug even on?
Second is the same...
NO virtual machines
- DigitalDreams
- User
- Posts: 18
- Joined: Mon Oct 30, 2023 10:50 pm
Re: ExamineDesktops() error
WEIRD
I closed PB completely and started a new program tab, now I get the debug result 3840 (4k Screen) !?
Something ran previously must have left things behind to confuse PB
I closed PB completely and started a new program tab, now I get the debug result 3840 (4k Screen) !?
Something ran previously must have left things behind to confuse PB
Re: ExamineDesktops() error
Sounds like the same thing as this report -> viewtopic.php?p=508012DigitalDreams wrote: Tue Oct 31, 2023 3:55 pm If ExamineDesktops()
ScreenX = DesktopWidth(0)
ScreenY = DesktopHeight(0)
ScreenD = DesktopDepth(0)
ScreenF = DesktopFrequency(0)
EndIf
Debug ScreenX
Produces an error on the first line.....
[14:48:25] [ERROR] ExamineDesktops() must be called before another Desktop function.
Why is this when the If statement IS calling the procedure before the other functions ?