public DrawingForm() {
// Required for Windows Form Designer support
InitializeComponent(); // Trigger a Paint event when the form is resized
this.SetStyle(ControlStyles.ResizeRedraw, true);
}
You should add the last sentence in your application.
// Required for Windows Form Designer support
InitializeComponent(); // Trigger a Paint event when the form is resized
this.SetStyle(ControlStyles.ResizeRedraw, true);
}
You should add the last sentence in your application.
解决方案 »
- 关于子程序执行时间的问题,百分求教!
- c#的数据转换简单问题
- 在线等待:跪倒求问WinXP下怎么安裝IE5.5,急急急急急急急急!!!!!!!!!!!!!
- DropDownList问题两则,急,在线等
- c# windows程序怎么可以实现重新登录??
- 用VS2010建立网页的步骤?
- 当窗体最大化时TabControl大小随窗口变化,但是TabPage大小未变
- 可否读出uniqueidentifier 列中的MAC地址?
- 关于.net程序内存溢出的问题
- ASCII码转换成UNICODE码
- 从byte[]数组里取字符串,中文怎么办?
- Winform中,如何让普通button当被点击时有被压下去的效果?
public Form1()
{
//
// Windows 窗体设计器支持所必需的
//
InitializeComponent();
this.KeyDown+=new KeyEventHandler(Form1_KeyDown);
this.timer.Start();
// TODO: 在 InitializeComponent 调用后添加任何构造函数代码
this.SetStyle(ControlStyles.ResizeRedraw, true);
}
Validate()迫使窗口重新绘制,就可以去掉你原先那个矩形,
因为实际上你最小化后在重新恢复后就是调用了一个Validate(),
使窗口客户区重画 wish u good luck
Greatsft
原来在timer_Tick(object sender, System.EventArgs e)里面加进以下就可以了。
this.timer.Start();