Information
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.

/win32icon

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

/win32icon:filename

Arguments

filename
The .ico file to add to your output file.

Remarks

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 to reference a .NET Framework resource file, or /resource to attach a .NET Framework resource file. See /win32resource to import a .res file.

To set /win32icon in the Visual Studio integrated development environment

  1. Open the project's Property Pages dialog box. For details, see <Projectname> Property Pages Dialog Box.
  2. Click the Common Properties folder.
  3. Click the Build property page.
  4. Modify the Application icon property.

To set /win32icon programmatically

  • See ApplicationIcon Property.

Example

The following code compiles in.vb and attaches an .ico file, rf.ico:

vbc /win32icon:rf.ico in.vb

See Also

Visual Basic Compiler Options | Sample Compilation Command Lines

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft