...open Windows's Calc?
I want to integrate a shortcut to Windows Calc in my application.
Ok, it seems quite str8 forward:
1. put a button / link label, whatever on a form
2. grab Calc's icon from system32\calc.exe and attach it to the
button, etc, if needed.
3. Call Process.Start("calc.exe") when the button is clicked.
Anyway, I wonder how a guy at MS would:
1. Get Calc's icon. That is, is there another way of "stealing" the
icon?
2. Start Calc.
Peter Bromberg [C# MVP] - 09 Oct 2007 15:09 GMT
Well! I'm not a "guy at Microsoft", but:
1) If you absolutely *must* have the actual icon from Calc.exe, there are a
number of freeware programs that will extract icons for you. Or, just find an
icon you like and use that (much easier).
2) Is correct.
-- Peter
Recursion: see Recursion
site: http://www.eggheadcafe.com
unBlog: http://petesbloggerama.blogspot.com
BlogMetaFinder: http://www.blogmetafinder.com
> ....open Windows's Calc?
> I want to integrate a shortcut to Windows Calc in my application.
[quoted text clipped - 8 lines]
> icon?
> 2. Start Calc.
Nicholas Paldino [.NET/C# MVP] - 09 Oct 2007 15:15 GMT
In order to get the icon of any file, you should call the SHGetFileInfo
API function through the P/Invoke layer. It is the only function that will
take into account things like shell namespace handlers, registry entries,
and the like to give you the proper icon for any file (or any ^type^ of
file, for that matter).

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> ...open Windows's Calc?
> I want to integrate a shortcut to Windows Calc in my application.
[quoted text clipped - 8 lines]
> icon?
> 2. Start Calc.