Set focus of renderer in vl

Is there a way to set focus on a renderer?

Ie, I have three output screens, and I want to set which one is the focused screen so that the keystrokes from that screen are processed. I have figured out how to tell which one is in focus, but not how to set which one is the focus…

Does that make sense?

unfortunately, this isn’t provided by stride at the moment. but you can use the windows API to focus any window by title:

image

the dotnet team provides the whole win32 API as nugets, in this case, we can use: NuGet Gallery | PInvoke.User32 0.7.104

but they provide everything else as well:

HowTo Set Window Focus.vl (21.2 KB)

when opening the document go to dependencies and select install for the missing nuget.

in future this should of course be added to the stride windowing api.

Sorry, I should have specified, I’m using the Skia renderer, not stride, where there doesn’t seem to be a title parameter. I’ve attempted to add this manually:

image

But for some reason one only one of the renderers is actually getting a title perhaps I’ve done this incorrectly…

Just closed and reopened and seems to be working nicely now…

glad it works, but there is a better way to do that with skia:

first, you shouldn’t modify nodes from the library, since that will be overwritten on the next update.
for the Skia window, there are the System.Windows nodes that modify its state, you just have to reference the VL.CoreLib.Windows package for that:

image

Something interesting is happening, basically I have 4 screens, and 3 of them have renderers, and I am switching focus between them. When I set the renderers to full screen without setting the SetWindowState they go full screen, but with it it leaves the taskbar at the bottom.

I’ve got around this by adding a monoflop with a delay, so after the patch opens, and the three screens go full screen, it makes them all windowed for a second, and then back to full screen which seems to be working.

As another workaround you could set the taskbar to only be visible on the primary screen and make the screen that hasn’t got a renderer primary (if it isn’t already).

Something else interesting is happening, I thought it might have something to do with different resolutions of my test monitors, but I’ve now tested on 3 identical projectors for the slideshow, and when they are all put into full screen one of the screens “overlaps” a small amount into the next one, even though all 3 are full screen. I’m running a quadro p620, one monitor as the GUI, and three as the outputs of the three slideshows.

It’s a bit strange…

Put them into span (surround/mosaic) mode and only use one renderer.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.