The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.


Inserts an .ico file in the output file. This .ico file represents the output file in Windows Explorer.



The .ico file to add to your output file. Enclose the file name in quotation marks (" ") if it contains a space.

You can create an .ico file with the Microsoft Windows Resource Compiler (RC). The resource compiler is invoked when you compile a Visual C++ program; an .ico file is created from the .rc file. The /win32icon and /win32resource options are mutually exclusive.

See /linkresource (Visual Basic) to reference a .NET Framework resource file, or /resource (Visual Basic) to attach a .NET Framework resource file. See /win32resource to import a .res file.

To set /win32icon in the Visual Studio IDE

  1. Have a project selected in Solution Explorer. On the Project menu, click Properties. For more information, see Introduction to the Project Designer.

  2. Click the Application tab.

  3. Modify the value in the Icon box.

The following code compiles In.vb and attaches an .ico file, Rf.ico.

vbc /win32icon:rf.ico in.vb
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback

Community Additions

© 2014 Microsoft