Compartir a través de


/win32icon

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

/win32icon:filename

Arguments

Term

Definition

filename

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

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

Example

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

vbc /win32icon:rf.ico in.vb

See Also

Reference

Sample Compilation Command Lines (Visual Basic)

Other Resources

Visual Basic Command-Line Compiler