all groups > vj# > december 2003 >
You're in the

vj#

group:

How to give a jbimp-created app a desktop icon



How to give a jbimp-created app a desktop icon mikesmithv NO[at]SPAM yahoo.com
12/28/2003 1:07:47 PM
vj#: I have a java app I am deploying to .NET using jbimp to convet my jar
to a j# exe file. It works great but I want to give it an icon that
you see on the desktop. It is currently just a generic icon. I am
merging resources so is it just a matter of adding an ico file to my
resources plus some other magic incantation? I don't know how things
are done in Windows, I'm a Java guy.

I can give it an icon using Visual Studio to compile it as a J#
application but I need to obfucate my code. So I am using a free Java
app (ProGuard) to obfucate my jar file on the Java side then jbimping
the obfucated jar over to .NET and presto, an obfucated .NET app. So
a side question would be: are there any free apps that obfucate code
for .NET? I couldn't find any. It would be nice an obfucate tool was
a built into in VS.

RE: How to give a jbimp-created app a desktop icon mikegreonline NO[at]SPAM microsoft.com
12/30/2003 12:20:51 AM
Hi Mike,

The way icons are specified for Windows Forms Applications (including J#
Applications) is that the Form has an icon property. The value of that
property specifies the icon resource to load. If you are using JBImp there
isn't any way to change that icon except by manually going into the
assembly (with some sort of binary or hex editor) and modifying the
embedded icon data. This isn't a good thing to do, it would be possible to
over-right some data if you try to replace the icon with a bigger one. I
think your best bet would be to build the app in J# and specify the icon
with the IDE.

As far as obfuscators go I did a little searching on the web and found
these web sites:

http://www.remotesoft.com/salamander/obfuscator.html
http://www.aspose.com/Products/Aspose.Obfuscator/
http://www.wiseowl.com/

I cannot recommend one over the other, this is just what I found by doing a
little surfing.

I hope this is helpful.

Michael Green
Microsoft Developer Support

Re: How to give a jbimp-created app a desktop icon mikesmithv NO[at]SPAM yahoo.com
12/30/2003 4:00:53 PM
Thanks for the info. I am going down the road you suggested.I found
the icon property you mentioned for the the main window which is a
System.Window.Forms.Form class. I specified my .ico resource as the
icon property and it faithfully uses that icon in the upper left
corner of the window and in the task bar but the .exe file created
still has the generic icon. I've searched Visual Studio over and
can't find where to specify that. Any ideas?

BTW, the obfuscators you mentioned all cost more than I paid for
Visual Studio! So until my ship comes in I'm sticking with my free
obfuscator.

Re: How to give a jbimp-created app a desktop icon mikegreonline NO[at]SPAM microsoft.com
1/7/2004 10:48:40 PM
Mike,

When you generate a Windows Forms Application with VS.NET it automagically
creates an App.ico icon file and embeds it as a resource. You can modify
the app.ico file with VS.NET. There aren't any tools that I know of to
modify an Application's icon after the assembly has been generated. I
think your best bet is to take your existing Java source code and convert
it to J# with J#.Net. Then you will wind up with a J# project and can set
the app.ico to whatever you want.

When looking at the obfuscators I didn't pay attention to the price, I was
just looking for a few examples. I'm sorry I didn't find one that was
within your price range.

Thanks,

Mike Green
Microsoft Developer Support
Re: How to give a jbimp-created app a desktop icon mikesmithv NO[at]SPAM yahoo.com
1/9/2004 8:31:46 PM
When I create a new project in Visual J#.NET by choosing New Project
and select Windows Application as the kind of project I see no app.ico
file in the list window. If I add a .ico file to the project and
assign it to the icon property of the form then I get that icon in the
forms window (upper left corner) and in the task bar while the window
is visible, but the .exe file still has the generic icon as I
mentioned in my last post. Where would I find this app.ico file?

Re: How to give a jbimp-created app a desktop icon mikegreonline NO[at]SPAM microsoft.com
1/12/2004 11:28:30 PM
Mike,

Okay, I see that there is no app.ico generated for the J# Windows
Application project. For the C# we automatically add that resource, I don't
how the icon is actually configured in the C# app, so let me do some
research on this and I'll get back to you.

Thanks,

Mike Green
Microsoft Developer Support

--------------------
| From: mikesmithv@yahoo.com (Mike Smith)
| Newsgroups: microsoft.public.dotnet.vjsharp
| Subject: Re: How to give a jbimp-created app a desktop icon
| Date: 9 Jan 2004 20:31:46 -0800
| Organization: http://groups.google.com
| Lines: 9
| Message-ID: <cad2f39c.0401092031.132e264@posting.google.com>
| References: <cad2f39c.0312281307.96c50c9@posting.google.com>
<1XmFKrmzDHA.3088@cpmsftngxa07.phx.gbl>
<cad2f39c.0312301600.4f67a351@posting.google.com>
<mh$jrBX1DHA.3564@cpmsftngxa07.phx.gbl>
| NNTP-Posting-Host: 67.125.86.77
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1073709108 25467 127.0.0.1 (10 Jan 2004
04:31:48 GMT)
| X-Complaints-To: groups-abuse@google.com
| NNTP-Posting-Date: Sat, 10 Jan 2004 04:31:48 +0000 (UTC)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfeed00.su
l.t-online.de!t-online.de!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!po
stnews1.google.com!not-for-mail
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.vjsharp:5129
| X-Tomcat-NG: microsoft.public.dotnet.vjsharp
|
| When I create a new project in Visual J#.NET by choosing New Project
| and select Windows Application as the kind of project I see no app.ico
| file in the list window. If I add a .ico file to the project and
| assign it to the icon property of the form then I get that icon in the
| forms window (upper left corner) and in the task bar while the window
| is visible, but the .exe file still has the generic icon as I
| mentioned in my last post. Where would I find this app.ico file?
|
| Mike
|
Re: How to give a jbimp-created app a desktop icon mikegreonline NO[at]SPAM microsoft.com
1/22/2004 9:32:22 PM
Mike,

I found a KB article that describes how to specify an icon for a J#
application. Please take a look at
http://support.microsoft.com/default.aspx?scid=kb;en-us;324969

Sorry it took so long to get you this information.

Michael Green
Microsoft Developer Support
Re: How to give a jbimp-created app a desktop icon mikesmithv NO[at]SPAM yahoo.com
1/22/2004 10:10:49 PM
Thanks. That looks like exactly what I need to know.

AddThis Social Bookmark Button