using System;
using System.Windows.Forms;namespace WindowsFormsApplication2
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
} private void button1_Click(object sender, EventArgs e)
{
Uri address = new Uri(textBox1.Text);//创建uri类型变量,存储浏览网页地址
webBrowser1.Url = address; }
private void textBox1_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 13)//如果按下的是Enter键
{
if (textBox1.Text!="")
{
button1_Click(sender, e);
}
}
}
}
}
新建Web浏览器
原创
©著作权归作者所有:来自51CTO博客作者蓬莱仙羽的原创作品,请联系作者获取转载授权,否则将追究法律责任
上一篇:C#操作内存
提问和评论都可以,用心的回复会被更多人看到
评论
发布评论
相关文章
-
Web浏览器大比拼
最新的浏览器基准测试又将出炉。文章《Web浏览器第四次大比拼:Ch
浏览器 web firefox safari chrome -
Unity Web自适应浏览器
unity web的自适应浏览器比我想象中要更简单,但是这里也只有更改最简单的东西实现了
unity web 自适应 浏览器 html -
web浏览器模糊器知识