메뉴 건너뛰기

Programing

C# 게시판

웹브라우저 예제

관리자 2018.12.30 15:15 조회 수 : 194

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace _4
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void txtUrl_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (this.txtUrl.Text != "" && e.KeyChar == (char)13)
            {
                this.wbView.Navigate(this.txtUrl.Text);
            }
        }
    }
}
텍스트 박스에 URL을 입력하고 엔터키를 치면 해당하는 웹사이트의 화면을 보여준다.

위로