■ SHDocVw.dll 참조를 사용해 인터넷 익스플로러 팝업을 실행하는 방법을 보여준다.
▶ 예제 코드 (C#)
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
using System; using System.Text; object url = "http://localhost/testpage.asp"; object flag = null; object targetFrame = null; string postData = "test1=1&test2=2&test3=3"; object post = ASCIIEncoding.ASCII.GetBytes(postData); object header = "Content-Type: application/x-www-form-urlencoded" + Convert.ToChar(10) + Convert.ToChar(13); SHDocVw.InternetExplorer internetExplorer = new SHDocVw.InternetExplorer(); SHDocVw.IWebBrowserApp webBrowserApp = internetExplorer as SHDocVw.IWebBrowserApp; webBrowserApp.Width = 500; webBrowserApp.Height = 500; webBrowserApp.ToolBar = 0; webBrowserApp.Visible = true; webBrowserApp.Navigate(url.ToString(), ref flag, ref targetFrame, ref post, ref header); |
※ System32 폴더에서 SHDocVw.dll 파일을 참조한다.