stevel05 Expert Licensed User Longtime User Dec 20, 2013 #1 I tried to get the screen size from the screen object, B4X: Dim S As Screen Log(S.MinX&","&S.MinY&","&S.MaxX&","&S.MaxY) but just get an error that says Object should first be initialized (screen) Click to expand... There is no initialize method for Screen.
I tried to get the screen size from the screen object, B4X: Dim S As Screen Log(S.MinX&","&S.MinY&","&S.MaxX&","&S.MaxY) but just get an error that says Object should first be initialized (screen) Click to expand... There is no initialize method for Screen.
stevel05 Expert Licensed User Longtime User Dec 20, 2013 #2 Ok, I got it. It needs to be used in conjunction with fx.screens. B4X: Dim SList As List = fx.Screens For Each S As Screen In SList Log(S.MinX&","&S.MinY&","&S.MaxX&","&S.MaxY) Next Or static calls to Screen via reflection Last edited: Dec 20, 2013
Ok, I got it. It needs to be used in conjunction with fx.screens. B4X: Dim SList As List = fx.Screens For Each S As Screen In SList Log(S.MinX&","&S.MinY&","&S.MaxX&","&S.MaxY) Next Or static calls to Screen via reflection
Erel B4X founder Staff member Licensed User Longtime User Dec 21, 2013 #3 You do not need reflection. If you want to get the primary screen you can access it with fx.PrimaryScreen.
You do not need reflection. If you want to get the primary screen you can access it with fx.PrimaryScreen.
stevel05 Expert Licensed User Longtime User Dec 21, 2013 #4 I was thinking more of using Screen.getScreensForRectangle to work out which monitor the app was currently on and the best place to open a new window when necessary.
I was thinking more of using Screen.getScreensForRectangle to work out which monitor the app was currently on and the best place to open a new window when necessary.