打开IE窗口并最大化显示

1 // API Constant
2 private const int SW_MAXIMIZE = 3 ;
3
4 [DllImport( " user32.dll " )]
5 public static extern int ShowWindow( int hwnd, int nCmdShow);
6
7 private void button1_Click( object sender, RoutedEventArgs e)
8 {
9 SHDocVw.InternetExplorer ie = new SHDocVw.InternetExplorer();
10
11 ie.Visible = true ;
12
13 object objFlags = 0 ;
14 object objTargetFrameName = string .Empty;
15 object objPostData = string .Empty;
16 object objHeaders = string .Empty;
17
18 ie.Navigate( " http://www.baidu.com " , ref objFlags, ref objTargetFrameName, ref objPostData, ref objHeaders);
19
20 ShowWindow(ie.HWND, SW_MAXIMIZE);
21 }

转载于:https://www.cnblogs.com/hongyu/archive/2011/07/12/2104397.html

你可能感兴趣的:(c#,python,前端)