I have a UserControl with AutoScroll set to true. When my application loses
then regains focus, the control scrolls itself to make ActiveControl visible.
This also happens when I dynamically add or remove child controls. Is there
any way to make the scrollbars stay put?

Here's some sample code demonstrating my problem. Run the application then
scroll down and right as far as possible. Button one will be scrolled out of
view and button two will be visible. Switch to another program then come back.
The scrollbars will move to make button one visible again.

----

using System;
using System.Windows.Forms;
using System.Drawing;

public class TestScroll
{
public static void Main(string[] args)
{
Application.Run(new TestForm());
}
}

public class TestForm : System.Windows.Forms.Form
{
public TestForm()
{
this.ClientSize = new System.Drawing.Size(400, 400);
this.Text = "TestForm";

container = new ContainerControl();
container.Dock = DockStyle.Fill;
container.AutoScroll = true;
this.Controls.Add(container);

btnTest1 = new Button();
btnTest1.Left = 0;
btnTest1.Top = 0;
btnTest1.Width = 50;
btnTest1.Height = 50;
btnTest1.Text = "One";
btnTest1.Click += new EventHandler(this.OnBtnClick);
container.Controls.Add(btnTest1);

btnTest2 = new Button();
btnTest2.Left = 500;
btnTest2.Top = 500;
btnTest2.Width = 50;
btnTest2.Height = 50;
btnTest2.Text = "Two";
btnTest2.Click += new EventHandler(this.OnBtnClick);
container.Controls.Add(btnTest2);
}

private void OnBtnClick(object sender, EventArgs args)
{
container.ActiveControl = (Control)sender;
}

private ContainerControl container;
private Button btnTest1;
private Button btnTest2;
}

----

Apologies if this is a common question. A quick Google search shows that
it's been asked before, but I didn't find any answers.

Thanks,
Ravi.