为什么这个窗口拉屎不擦屁股,关闭后留下了一团黑黑在桌面上??
写了一个小工具条。
运行起来如图一所示,
当按Esc关闭之后,就在桌面上留下一团漆黑。请问高手这是什么原因,应该怎样修改呢?
//以下是涉及到窗口关闭的代码
private void textBox_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == 27)
{
this.Close();
}
}
private void buttonGo_Click(object sender, EventArgs e)
{
if (this.textBox.Text == "q" || this.textBox.Text == "Q" || this.textBox.Text == "exit")
{
this.Close();
return;
}
this.targetUrl = getTargetUrl();
this.keywords = this.textBox.Text;
string kwTransUrl = HttpUtility.UrlEncode(this.keywords,Encoding.Default);
System.Diagnostics.Process.Start("firefox.exe", " -new-window " +this.targetUrl + kwTransUrl);
}
图片一
[img="http://hiphotos.baidu.com/%C3%F7%DC%BE%D3%EF%D1%D4/pic/item/e89f85d37365f521960a1675.jpg"]运行时[/img]
图片二
[img="http://hiphotos.baidu.com/%C3%F7%DC%BE%D3%EF%D1%D4/pic/item/93457cda35b18dceb7fd4875.jpg"]关闭后[/img]