We would like to build a community for Small Basic programmers of any age who like to code. Everyone from total beginner to guru is welcome. Click here to register and share your programming journey!


Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Use second screen by small basic
#1
Hello LitDev,

I am using a dual-monitor setup on my computer. My Small Basic program starts on the primary screen. I use
LDWindows.Create() to open an additional window, but I want to move this second window to the secondary screen.
Is it possible to achieve this with your current extension, or could you provide a new LDWindows command that enables this functionality?

Thank you very much,
Martin




Attached Files Thumbnail(s)
   
Reply
#2
Hi, I will look into this Smile
Reply
#3
Hi,

Success I hope - please download latest beta version, perhaps with extension manager - version 1.2.30.11

I nearly forgot the steps to update everything for a new beta release, its been so long - I hope I remembered them all Wink

I added 2 new methods in LDUtilities - GetScreens and MoveGraphicsWindow

My test code

Code:
'Create 2 GW
GraphicsWindow.Show()
GraphicsWindow.Title = "Main"
id = LDWindows.Create()
GraphicsWindow.Title = id

'Get screens available
screens = LDUtilities.GetScreens()
numScreen = Array.GetItemCount(screens)

'Output screen details
For i = 1 To numScreen
  indices = Array.GetAllIndices(screens[i])
  For j = 1 To Array.GetItemCount(indices)
    TextWindow.WriteLine(indices[j] + " = " + screens[i][indices[j]])
  EndFor
  TextWindow.WriteLine("")
EndFor

'Move the 2nd (current) GW between screens
For i = 1 To numScreen
  LDUtilities.MoveGraphicsWindow(screens[i]["Name"], 500, 0, "False")
  Program.Delay(5000)
EndFor

'Then full screen
For i = 1 To numScreen
  LDUtilities.MoveGraphicsWindow(screens[i]["Name"], 500, 0, "True")
  Program.Delay(5000)
EndFor
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)