Page 1 of 1

Screen size

Posted: Tue Oct 25, 2022 3:23 am
by samxxx
;- Screen constants
#SCREEN_WIDTH = 640
#SCREEN_HEIGHT = 480

;- Window Title
Title$ = "Blank Program"
;This is the start of our initialisation section - all we're doing here is setting up some variables & contants that will get used later. The most important constants are #SCREEN_WIDTH and #SCREEN_HEIGHT, as these define the display area.

; Initialistion code...
; 1. create a window

If OpenWindow(#Window_0, 216, 0, #SCREEN_WIDTH, #SCREEN_HEIGHT, #PB_Window_SystemMenu | #PB_Window_SizeGadget | #PB_Window_TitleBar | #PB_Window_ScreenCentered , Title$)

;If CreateGadgetList(WindowID())

;EndIf
;EndIf

I am getting an Error with this screen Title$ - number expected instead of string. I am stuck!

Re: Screen size

Posted: Tue Oct 25, 2022 3:44 am
by Paul
Guess you haven't looked at the PureBasic Help file...
Syntax
Result = OpenWindow(#Window, x, y, InnerWidth, InnerHeight, Title$ [, Flags [, ParentWindowID]])
Maybe your code came from a very old online book?

Re: Screen size

Posted: Tue Oct 25, 2022 7:12 am
by Caronte3D
:? samxxx, can you make a response to this thread saying you aren't a bot?

Re: Screen size

Posted: Wed Oct 26, 2022 7:46 pm
by Olli