==========================webBorowser网页控件
webBorowser网页控件 取网址
//this.webBrowser1.Url = new Uri("http://www.g.cn");
private void button1_Click(object sender, EventArgs e)
{
string url = this.textBox1.Text.Trim();
Navigate(url);
}
private void Navigate(string address)
{
if (string.IsNullOrEmpty(address)) return;
if (address.Equals("about:blank")) return;
if (!address.StartsWith("http://") &&
!address.StartsWith("https://"))
{
address = "http://" + address;
}
try
{
// 导航
webBrowser1.Navigate(address);
// 导航
// webBrowser1.Url = new Uri(address);
}
catch (System.UriFormatException)
{
return;
}
}
==================================openfiledioag控件
openfiledioag控件:
打开文件流 取路径:openfiledioag1.filename;
file:
思想:write 写出到->流 reader从流中读入到->文件(本)
wrirte写 reader读