// handle alt+enter ourselves
form.KeyDown += (o, e) =>
{
if (e.Alt && e.KeyCode == Keys.Enter) {
bool Full;
Output ThisOut;
swapChain.GetFullScreenState(out Full, out ThisOut);
if (Full == true)
{
swapChain.SetFullScreenState(false, ThisOut);
}
else if (Full == false)
{
swapChain.SetFullScreenState(true, ThisOut);
}
}
// swapChain.IsFullScreen = !swapChain.IsFullScreen;
我正在使用 SlimDx 上的教程 - http://slimdx.org/tutorials/devicecreation.php并注意到交换链没有 IsFullScreen 属性。因此,我尝试使用其他可用的方法并遇到了问题。- 当我切换到全屏时,它会正常运行;但是,当我切换回非全屏时,我看到的只是一个不可移动的空白框。
怎么了?为什么没有教程中的 isFullScreen 属性。设备是否在某处丢失?