locked
Icon for my Program RRS feed

  • Question

  • Hi there,

    how can I set an Icon for my Program? I know how to put an Icon on the form, but not how to set an Icon i can see on the desktop (or where ever the *.exe is).

    Thanks,

    Finch.
    Tuesday, September 13, 2005 7:24 AM

Answers

  • Hi,

    look at this with the command line compiler, it should be possible to pass these arguments to the compiler in shardevelop, I hope. Otherwise you must use the csc.exe.

    Working with Resources Using csc.exe

    The next order of business is to examine how csc.exe can be used to embed resources (such as string tables or image files) into .NET assemblies. First up, the /win32Icon option can be used to specify the path to a Win32 *.ico file. Assume that you have placed an icon file named HappyDude.ico into the application directory of the current Windows Forms application. To establish HappyDude.ico as the icon for the executable, issue the following command set:

    csc /t:winexe /win32icon:HappyDude.ico /r:airvehicles.dll *.cs 

    At this point, the executable assembly should be updated as shown in Figure 10.

    from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/csharpcompiler.asp[/qoute]

    Tuesday, September 13, 2005 9:18 AM

    All replies

    • Right click on your project name in the Solution Explorer and select Properties from the popup menu.

      The Program Icon is on the Application  page tab.

      Chris

      Tuesday, September 13, 2005 7:50 AM
    • Well...
      I'm using SharpDevelopBig Smile
      Tuesday, September 13, 2005 8:51 AM
    • Hi,

      look at this with the command line compiler, it should be possible to pass these arguments to the compiler in shardevelop, I hope. Otherwise you must use the csc.exe.

      Working with Resources Using csc.exe

      The next order of business is to examine how csc.exe can be used to embed resources (such as string tables or image files) into .NET assemblies. First up, the /win32Icon option can be used to specify the path to a Win32 *.ico file. Assume that you have placed an icon file named HappyDude.ico into the application directory of the current Windows Forms application. To establish HappyDude.ico as the icon for the executable, issue the following command set:

      csc /t:winexe /win32icon:HappyDude.ico /r:airvehicles.dll *.cs 

      At this point, the executable assembly should be updated as shown in Figure 10.

      from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/csharpcompiler.asp[/qoute]

      Tuesday, September 13, 2005 9:18 AM
    • Hi,

      look at this with the command line compiler, it should be possible to pass these arguments to the compiler in shardevelop, I hope. Otherwise you must use the csc.exe.

      Working with Resources Using csc.exe

      The next order of business is to examine how csc.exe can be used to embed resources (such as string tables or image files) into .NET assemblies. First up, the /win32Icon option can be used to specify the path to a Win32 *.ico file. Assume that you have placed an icon file named HappyDude.ico into the application directory of the current Windows Forms application. To establish HappyDude.ico as the icon for the executable, issue the following command set:

      csc /t:winexe /win32icon:HappyDude.ico /r:airvehicles.dll *.cs 

      At this point, the executable assembly should be updated as shown in Figure 10.

      from http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnvs05/html/csharpcompiler.asp [/qoute]

      Tuesday, September 13, 2005 9:18 AM