이 문서는 수동으로 번역한 것입니다. 원본 텍스트를 보려면 포인터를 문서의 문장 위로 올리십시오.
번역
원본
이 항목은 아직 평가되지 않았습니다.- 이 항목 평가

HtmlWindow.Load 이벤트

창의 문서와 모든 해당 요소의 초기화가 완료되면 발생합니다.

네임스페이스:  System.Windows.Forms
어셈블리:  System.Windows.Forms(System.Windows.Forms.dll)
public event HtmlElementEventHandler Load

Load 이벤트는 WebBrowser 컨트롤의 DocumentCompleted 이벤트와 비슷하게 작동하여 문서 내부의 HTML 요소에 안전하게 액세스할 수 있다는 신호를 보냅니다.

Load 이벤트의 기본 동작을 취소할 수 없습니다.

이벤트 버블링 취소하기와 이벤트 상에서 기본 동작 취소하기 사이의 차이점에 대해서는, About the DHTML Object Model을 참조하시기 바랍니다.

다음 코드 예제에서는 이 멤버를 사용하는 방법을 보여 줍니다. 이 예제에서 이벤트 처리기는 Load 이벤트가 발생할 때 보고합니다. 이 보고서를 사용하면 이벤트가 발생하는 경우를 이해할 수 있으며 보다 원활하게 디버깅 작업을 수행할 수 있습니다. 자주 발생하는 이벤트 또는 여러 이벤트를 보고하려면 MessageBox.ShowConsole.WriteLine으로 바꾸거나 여러 줄로 구성된 TextBox에 메시지를 추가합니다.

예제 코드를 실행하려면 HtmlWindow1이라는 HtmlWindow 형식의 인스턴스가 있는 프로젝트에 해당 코드를 붙여넣습니다. 그런 다음 이벤트 처리기가 Load 이벤트와 연결되어 있는지 확인합니다.


private void HtmlWindow1_Load(Object sender, HtmlElementEventArgs e) {

System.Text.StringBuilder messageBoxCS = new System.Text.StringBuilder();
messageBoxCS.AppendFormat("{0} = {1}", "MouseButtonsPressed", e.MouseButtonsPressed );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ClientMousePosition", e.ClientMousePosition );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "OffsetMousePosition", e.OffsetMousePosition );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "MousePosition", e.MousePosition );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "BubbleEvent", e.BubbleEvent );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "KeyPressedCode", e.KeyPressedCode );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "AltKeyPressed", e.AltKeyPressed );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "CtrlKeyPressed", e.CtrlKeyPressed );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ShiftKeyPressed", e.ShiftKeyPressed );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "EventType", e.EventType );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ReturnValue", e.ReturnValue );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "FromElement", e.FromElement );
messageBoxCS.AppendLine();
messageBoxCS.AppendFormat("{0} = {1}", "ToElement", e.ToElement );
messageBoxCS.AppendLine();
MessageBox.Show(messageBoxCS.ToString(), "Load Event" );
}


.NET Framework

4, 3.5, 3.0, 2.0에서 지원

.NET Framework Client Profile

4, 3.5 SP1에서 지원

Windows 7, Windows Vista SP1 이상, Windows XP SP3, Windows XP SP2 x64 버전, Windows Server 2008(Server Core는 지원되지 않음), Windows Server 2008 R2(Server Core는 SP1 이상에서 지원됨), Windows Server 2003 SP2

.NET Framework에서 모든 플랫폼의 전체 버전을 지원하지는 않습니다. 지원되는 버전의 목록을 보려면 .NET Framework 시스템 요구 사항을 참조하십시오.
이 정보가 도움이 되었습니까?
(1500자 남음)

커뮤니티 추가 항목

추가
Microsoft는 MSDN 웹 사이트에 대한 귀하의 의견을 이해하기 위해 온라인 설문 조사를 진행하고 있습니다. 참여하도록 선택하시면 MSDN 웹 사이트에서 나가실 때 온라인 설문 조사가 표시됩니다.

참여하시겠습니까?
© 2013 Microsoft. All rights reserved.