WPF 加载exe执行文件 | WPF c#实现窗口全屏

System.Diagnostics.Process.Start(@"文件绝对路径");

 

 

=============================================

 

 

1.xaml代码如下

在<window>中添加Loaded="Window_Loaded"

2.C#代码如下

private void Window_Loaded(object sender, RoutedEventArgs e)

{
// 设置全屏
this.WindowState = System.Windows.WindowState.Normal;
this.WindowStyle = System.Windows.WindowStyle.None;
this.ResizeMode = System.Windows.ResizeMode.NoResize;
this.Topmost = true;

this.Left = 0.0;
this.Top = 0.0;
this.Width = 1600;//屏幕宽度
this.Height = 900;//屏幕高度
}

 

你可能感兴趣的:(WPF 加载exe执行文件 | WPF c#实现窗口全屏)