cs部分:
public void SetFullScreen(string type)
{
if (type == "1")
{
if (this.FormBorderStyle != FormBorderStyle.None)
{
this.FormBorderStyle = FormBorderStyle.None;
this.WindowState = FormWindowState.Maximized;
this.TopMost = true;
WindowsFullScreenApi.SetWinFullScreen(Handle);
}
}
else
{
this.FormBorderStyle = FormBorderStyle.Sizable;
this.WindowState = FormWindowState.Maximized;
}
}
JS部分:
window.external.SetFullScreen("1");