There is no managed equivalent other than the VB implementation. It
ends up calling SetForegroundWi ndow, but it does a great deal of other setup
as well (getting the window handle, checking to see if it is enabled, etc,
etc), so you might want to use the class in VB.
Note, the Interaction class in the Microsoft.Visua lBasic namespace IS
managed code, and is no less native to .NET than any classes you might use
in the System namespace, or anything else. C# is the language, the glue
that you use for calling existing managed code constructs.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard. caspershouse.co m
"mr peanut" <mr******@discu ssions.microsof t.comwrote in message
news:F9******** *************** ***********@mic rosoft.com...
>I want to activate an application (Excel) in code. If I reference
microsoft.visua lbasic, I could use:
Interaction.App Activate("Micro soft Excel");
But I wold rather use a native C# approach. I know that
Interaction.Msg Box
has a native analog: MessageBox.Show .
Is there one for AppActivate?