Closed Ikeiwa closed 4 years ago
Probably the easiest way is to start Ultraviolet headless (configuration.Headless = true
) so that it doesn't create a primary window. You can then create the window yourself using the Win32 API and add it to the Ultraviolet context with uv.GetPlatform().Windows.CreateFromNativePointer()
. You can make this your application's primary window with uv.GetPlatform().Windows.DesignatePrimary()
.
Unfortunately, I'm not familiar with the steps that would be necessary to make the window transparent.
I manage to create a native window and use CreateFromNativePointer
but when I try to use DesignatePrimary
I get an error :
System.ArgumentNullException: 'Value cannot be null.
Parameter name: settings'
Can you post a complete stack trace?
Exception thrown: 'System.ArgumentNullException' in Ultraviolet.Core.dll
at Ultraviolet.Core.Contract.Require[T](T argument, String message)
at Ultraviolet.UltravioletApplicationWindowSettings.Save(UltravioletApplicationWindowSettings settings)
at Ultraviolet.UltravioletApplicationSettings.Save(String path, UltravioletApplicationSettings settings)
at Ultraviolet.UltravioletApplication.SaveSettings()
at Ultraviolet.UltravioletApplication.uv_PrimaryWindowChanging(IUltravioletWindow window)
at Ultraviolet.SDL2.Platform.SDL2UltravioletWindowInfo.OnPrimaryWindowChanging()
at Ultraviolet.SDL2.Platform.SDL2UltravioletWindowInfo.DesignatePrimary(IUltravioletWindow window)
at DesktopMascot.Game.OnLoadingContent() in F:\VisualProjects\DesktopMascot\Game.cs:line 48
This bug should be fixed in the newest version of Ultraviolet, which I've just pushed to NuGet.
Hi, I'm working on a project that require advanced window feature and I wondered if there was currently a way to get the native pointer of a window to apply special window styles (this and this), and also set the clearing color to transparent, right now if I try to set it to transparent I just get a black background. I'm trying to make a transparent, on top and clic-through window.