App icon wrapped with launch4j not changing in taskar - launch4j

I wrapped my app.jar into app.exe using launch4j , the icon appearing on desktop is correct
but in the windows taskbar I still have the java icon
any solution ?

Launch4J's only job is to wrap your .jar into .exe, thus it can only set the icon for the exe.
If you want to have a custom icon in the taskbar and in your window, you must set a custom icon in your Java code. The solution for that depends on whether you use SWT, Swing, etc. But is should come down to getting the icon from the resources and setting it in your Window/Frame/...
For example: How do I change the default application icon in Java?

Related

Desktop shortcut icon overriding app icon

We have an application that is installed with a desktop shortcut icon that is different than the application icon. So, the result we are aiming at is:
a desktop shorcut with icon A, pointing to our application
once clicked, the application will launch with it's own icon B
However, the observed behaviour is that our application is launched with the shortcut icon A visible in the start menu bar, and the proper app icon B visible in the title bar. Is there an option to override this behaviour?
We are using InnoSetup for our installer, if that matters.
I found one solution - having the process restart itself will fix the problem. It's pretty clumsy, but it works. I'll mark this as an accepted answer unless somebody has a better suggestion.

Monodevelop - Application disapear on click (anywhere)

I have a simple GUI application which uses Gtk. When I run it to test, application appear, but when I click (anywhere) application hide. It is also not visible in application's bar.
Window's "TypeHint" was set to "Splash". I set it back to "Dialog" and that solved all problems mentioned before.

Start external exe within own process

I have a VB6 executable we use as a Starter executable for our real program.
The problem is that windows 7 shows a new icon in the taskbar for the new process, instead of the one i clicked on to start my program (of course, because the starter exe has already ended, and the new exe seems to be a new program).
Currently I use the Shell object to start the other exe. Is there a better way to do it from vb6, maybe by using a native C function with declare that does start an exe in the current process, without spawning a new process?
EDIT:
Thanks to atzz for the great information about Application Model IDs. I now have a shortcut to my app starter with a well defined id, and my app also sets the ID when started, and is now accesssible beautifully from the right icon in the toolbar. However, two problems persist:
The app is a Java App started with Exe4J, and I don't have any chance to set the AppID before Exe4J shows the splash screen, so while showing the splash screen there is a second icon in the taskbar.
If I don't manually drag my starter app icon from the Desktop to the toolbar, but instead use my apps icon and set it to be "sticky", the real app is sticked, and not the launcher.
Both problems would be beautifully solved if my launcher would start the app from within its own process. I heard something of using exec() instead of fork() for linux programs to achive this... is there something similar for windows?
I believe there is a way to accomplish what you need via Windows 7 taskbar API, though I never did it myself and thus don't remember clearly enough what I've read on the subject. Look around the Application ID concept.
Some links:
Developing for the Windows 7 Taskbar – Application ID
Inside Windows 7 - Introducing The Taskbar APIs
If the problem is the icon, why not give both programs the same icon (and the same App.Title). Then the user won't be able to tell the difference between the two taskbar entries. Presumably they aren't both visible at the same time.
Alternatively set your starter app not to appear in the taskbar (Form property ShowInTaskbar = False in the design view)

Update of application Icon in Windows-7 Taskbar

I have a normal MFC Application with an embedded icon. If I start the application, the icon is shown inside the windows-7 taskbar.
But when I change the icon inside the resources, rebuild the application and start it, the taskbar doesn't show the current icon, but the icon from the first run.
There is no special code inside the application that does something specific with the windows-7 taskbar.
Is there a way, (in C++) to tell the windows-7 taskbar to show the current icon?
Did you empty/delete the shell icon cache?
I believe that if you rebuild an application, but it's still called by the same name, then explorer doesn't think it should reload the icon, even though the new icon is the only one in the app.
If you were to release the program, no-one else would have this problem since the first version of the app would have the new icon, but for your own purposes you can call SHChangeNotify(); from shell32.dll to refresh your own view of the icon.
did your remove the previous icon from resource....and assign the new icon to the file..too after putting in the resource...might that would work....

Windows Mobile 6.5 Running Program List Icon

I've got an windows mobile 6.5 application I'm developing and am having trouble with one icon. At the top right hand of the screen there is an icon that, when clicked, will display a list of programs running the background with the option to close them.
When my program is in this list, it's icon does not show up as the others do.
I'm my exe I've got an .ico for 16x16, 22x22, 32x32, 36x36, 44x44, 45x45, 60x60, and 64x64, with the optional 90x90 png and registry setting in my cab.
What am I missing?
I'm just guessing here, but is this an HTC phone? Stock Windows Mobile does not have a "task list" icon in the system tray, so this task list is provided by the OEM. You would need to find out how they are obtaining the icon.
Chances are they are not obtaining it from the cab, but are actually getting it from your top level app window. You should check you're specifying the right icon in your WNDCLASS structure when calling RegisterClass. It is pretty common in WM to forget this because normally this icon is not visible.
Windows Embedded Handheld (Windows Mobile) 6.5/6.5.3 Appications use the exe embedded ico files only if there is no icon via registry available. In those cases the icon also look very ugly in the start menu. So you will have to add a registry entry to an icon file.
[HKEY_LOCAL_MACHINE\Security\Shell\StartInfo\Start\MyApp.lnk]
"Icon"="\Windows\myapp.png"
See also: https://blogs.windows.com/windowsexperience/2009/08/11/using-custom-icons-in-windows-mobile-6-5/

Resources