Originally Posted by
Petr Schreiber
Hi Justin,
thank you for your question!
I think you could re-use the following functions from TBGL module for the moment:
TBGL_DisplayGetCount()
TBGL_DisplayGetInfo( displayNumber, variableWidth, variableHeight [, variableDepth] )
TBGL_SendWindowToDisplay( windowHandle, displayNumber [, newX [, newY]] )
TBGL_GetWindowDisplay( hWnd )
I currently sadly do not have multi-display setup, so cannot test if it works correctly for UI module windows.
Let us know!
Petr
Hi Petr,
Thanks for the answer.
But I don't see how to get the Handle for InputBox who returns a string, and when the window is created the script is suspended until the box is closed (with or without an answer) .
And MsgBox, as seen in TBGL_SendWindowToDisplay help page retuns a number, always '1' in all my tests.
I made this test script.
uses "console","tbgl"
Dim ConsoleHandle as DWord
ConsoleHandle = Console_GetHandle
printl " consolehandle = " , consolehandle
hwnd = consolehandle
Dim hWnd As DWord
Dim displaysFound, display, width, height, bitDepth As Long
dim retcode as long
'...
displaysFound = tbgl_DisplayGetCount()
retcode = MsgBox hWnd, "Found "+Format$(displaysFound)+" display(s), TBGL window is on no."+Format$(TBGL_GetWindowDisplay(hWnd) )
printl "phase1 " , retcode
For display = 1 To displaysFound
tbgl_DisplayGetInfo(display, width, height, bitDepth)
retcode = MsgBox hWnd, "Display "+Format$(display) + ": " + width + "x" + height + " " + bitDepth +"bit color"
printl "phase2 " , retcode
Next
If displaysFound = 1 Then
retcode = MsgBox hWnd, "Just one display found"
printl "phase3 ", retcode
Else
For display = 1 To displaysFound
printl " before sendwindow"
tbgl_SendWindowToDisplay(hWnd, display, display * 200, display * 10)
printl " after sendwindow"
retcode = MsgBox hWnd, "TBGL window sent to display no."+Format$(display)
printl "phase4" , retcode
Sleep 2000
Next
End If
printl "waitkey"
WaitKey(100)
This script opens a console window which is effectively moved around screens, but I still don't see how to get the 'hWnd' of InputBox$ and MsgBox.
Best regards
Justin
Bookmarks