Do not use DoEvents , evil .
Use the panel and add all the controls you want to disable. When the panel is disabled, all internal controls will be disabled, but the value of their Enabled property will not actually be changed.
Here is a working example:
public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void button1_Click(object sender, EventArgs e) {
ken2k source share