HighTechTalks DotNet Forums  

Application icon

Dotnet VJSharp microsoft.public.dotnet.vjsharp


Discuss Application icon in the Dotnet VJSharp forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Michael Sven
 
Posts: n/a

Default Application icon - 10-13-2004 , 05:57 PM






Hi

I have an applciation in JSharp. Does anyone know how to associate an icon
with the application, so that the icon appears whne the .exe is browsed in
Windows Explorer? I have tried embedding the icon file.

In CSharp it is a project property, but the corresponding property does not
seem to be present for JSharp projects.

Any help appreciated.

Regards

Mike



Reply With Quote
  #2  
Old   
Michael Sven
 
Posts: n/a

Default Re: Application icon - 10-18-2004 , 01:40 PM






Hi Lars-Inge

Thank you very much. That worked.

Regards

Mike

"Lars-Inge Tønnessen [VJ# MVP]" <http://emailme.larsinge.com> wrote in
message news:Od0BoJxsEHA.1924 (AT) TK2MSFTNGP10 (DOT) phx.gbl...
Quote:
Sorry I'm not online when I'm writing this so I don't have a direct link,
but here are the steps from the MSDN lib.

Please search for "KB324969" in the MSDN lib (or Q324969).


Knowledge Base

This step-by-step article describes how to add an application icon to a
Visual J# .NET application.

The Microsoft Visual Basic .NET and Microsoft Visual C# .NET /win32icon
compiler option inserts an icon (.ico) file in the output file, which
gives
the output file the appearance that you want in Windows Explorer. The
Visual
J# .NET compiler does not support the /win32icon option. To work around
this, you can create a resource compiler script file for the icon, and
then
create a resource (.res) file by using the Rc.exe utility. You can add the
resource file to a Visual J# .NET application by using the compiler
/win32res option.

Add an Application Icon to a Visual J# .NET Application
In Notepad, use the following code to create a resource compiler script
file
that references the icon:

1 ICON "icon.ico"

Save the file in Notepad as Icon.rc.

Run the following at a command prompt to create a resource (.res) file
named
Icon.res:
rc icon.rc

Compile the Visual J# .NET application and reference the icon resource
file
(Icon.res) by using the /win32res option. You can do this from the command
line or in the Microsoft Visual Studio development environment. To do this
from the command line, run the following command:

vjc /win32res:icon.res app.jsl


To do this from the Microsoft Visual Studio development environment:

Open the Property Pages dialog box for the project.
Click the Configuration Properties folder.
Click the Advanced tab.
Add the following to the Additional Options property:

/win32res:icon.res

The resulting .exe file will have the appropriate icon next to it when you
view it in Windows Explorer.


Regards,
Lars-Inge Tønnessen





Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.