More digging through MSDN showed that you can override a form's ShowWithoutActivation property to always return true to get the same effect. This allows you to use the normal Form.Show() method and all it's automatic goodness. However, this is only available in .Net Framework 2.0 or later. If you are in the 1.0 or 1.1 world, you'll need to do the P/Invoke to call the ShowWindow API.
The code looks like this:
protected override bool ShowWithoutActivationIt is like magic. I'm liking it a lot.
{
get
{
return true;
}
}
2 comments:
like magic
Indeed. I'm interested in finding out what type of application you are applying the magic to.
Post a Comment