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 }
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 }