Problem with IDisplay.SetSeamlessMode
Hello.
I develop on C#.
I'm trying to switch VirtualBox to SeamlessMode throughout IDisplay.SetSeamlessMode with runing VM, but it's not working. https://forums.virtualbox.org/viewtopic.php?f=34&t=65462
VirtualBoxClient vboxclient = new VirtualBoxClient();
IMachine machine = vboxclient.VirtualBox.FindMachine("VM");
Session session = vboxclient.Session;
try
{
machine.LockMachine(session, LockType.LockType_Shared);
session.Console.Display.SetSeamlessMode(1);
} catch (Exception e){MessageBox.Show(e.Message);}
} finally {
if (session.State == SessionState.SessionState_Locked)
session.UnlockMachine();
}
Change History
(2)
Resolution: |
→ invalid
|
Status: |
new → closed
|
Description: |
modified (diff)
|
Sorry, this is a misunderstanding, most likely caused by the insufficient documentation of the API method. This method can only be used by the GUI. If other API clients use it there will most likely be redraw issues afterwards and other quirky behavior. Hands off!
There is no way to programmatically switch the GUI to seamless mode while the VM is running, just like there is no way to switch it to fullscreen mode. The display mode can be set before starting the VM by adjusting the extradata key "GUI/Seamless", but it has no effect later (well, the GUI overwrites it with whatever display mode state one selects).
This means there's nothing to fix as such (except maybe the documentation). There are no plans for adding an API for controlling the GUI from outside either.