Is it possible to add custom icon to hta - icons

Is it possible to add custom icon to hta? What I mean is change the default hta file icon, which is "System Application Icon". Can it be done without assigning new icon to the extension, and not using shortcuts to the file ?
Like this

WinRAR can help you do that.
Package your hta & icon file to exe;
In options,
a. select "silent" extract;
b. set extract path;
c. create extract path and then put that icon file there, select icon in this path.
d. set run your hta(c:\your_path\your.hta) after exe file extracted.
(i could not provide more detail because i don't have WinRAR installed right now, it's a common way to add icon for hta.)
Every time user run the exe you created, it will just extract hta, icon to the path you specified, and then run your hta. the exe file will have the icon display, even copy to another computer.
If you get all work done correctly, you will get a exe file with the icon you defined.
BTW, you can also try google: hta exe icon
Good luck!

Yup, you sure can: this. You embed the icon in the hta file

Better You use Exescript Software
It's Good because ease of its use and add icon to resource file (which appears on top border of hta)
After that add icon in settings menu to Exe File and build the project
U will get a exe file with custom icon.

Related

Customize Applescript app icon

I have created my AppleScript, tested it, saved it as an .app and it works.
Now, how do I set a custom icon for it?
I have done a bit of googling and tried a few different things but cannot get it to work. The app is mainly for me and maybe some people I know to make workflows easier so having a nice little icon makes a huge difference.
Can anyone help with this please?
Basically you need an .icns icon file.
Open your application with right-click > Show Package Contents
Navigate to Contents > Resources
Delete applet.icns
Drag the custom icon file into the Resources folder
Rename the icon file in Resources to applet.icns
To update the icon appearance open and re-save the applet in Script Editor.
This is how I do it:
In Finder, select your icon file.
Get Info (CMD-I) on the file.
Click the icon in the top left corner of the Get Info window.
Copy it via CMD-C.
Now Get Info on your AppleScript file.
Click the icon in the top left corner of the Get Info window.
Paste the icon using CMD-V.
The AppleScript icon should be replaced by the icon copied from the icon file.
A screen recording demonstrating this process can be viewed at this answer from AskDifferent.
Just building into #pipwerks answers: You can also use Drag&Drop!
(Optional) Create your icon online from any image on https://iconverticons.com/online/ and download de .icns file for your icon.
Get Info (CMD-I) on you AppleScript file.
Now Drag&Drop your .icns file into the small icon in the top left corner.
It works and now it's ready to add it to the dock or wherever you want.
On newer systems if the above methods do not work there is another solution.
In Script Editor, after opening our script (.app), choose View -> Show Bundle Contents from the menu (or press cmd +0).
In the panel that will expand on the right (Bundle Info) in the Resources section, right-click the applet.icns file and select delete from the drop-down menu.
Our new icon file with the same name applet.icns drag and drop into the window Resources where you just deleted it.
Save application and voila :-D
Here's another way on newer systems, I'm using macOS 12.1.
Open the new icon image file in Preview and choose File > Export...
Hold down the Option key while selecting "Format" and see a whole bunch of new choices including ICNS.
Save it, drop it in your Resources folder, and you're good to go.

Select Custom AutoHotKey Tray Icon from .ico file

I have a functioning AHK script, and I want to assign a custom icon to it in the toolbar, I have a .ico file that I created that has the icon that i want to use. I can use the default (first) page in the .ico file just fine, but I need to use the second one. How do I do this?
This is the troublesome line of code
Menu, Tray, Icon, \\volvo\users\pleavitt\Documents\Paul\Interface\Custom Icons\T-CheckIcon.ico,1,1
If I change the first "1" at the end of the code to a "2" it throws an error, but from this webpage I thought that that is what I was supposed to do.
In conclusion, I want to be able to select a page from the .ico file to use as the tray icon for my AHK script.
thanks!
Paul
Menu
Documentation: http://ahkscript.org/docs/commands/Menu.htm
Menu, Tray, FileName [, IconNumber, IconWidth]
IconNumber and IconWidth are optional.
I am unsure that it supports Files on a network, i.e. \\path\to\file.ico.
Try copying it to the script's directory, and use the relative path like so :
Menu, Tray, Icon, %A_ScriptDir%\T-CheckIcon.ico
NB: Be sure to use the latest version of AutoHotkey.

Windows form application - Icon image location?

I think this should be a relatively easy one to answer, I hope, but is proving to be a bit of a stress!
I have used an Icon on an old application developed some years ago and I would now like to use the icon for a current project.. however..
I added the icon using the upload/import icon-image in the properties window, and did not add it in the project resources file, nor specify its location anywhere in my code, using only the icon tool in the properties window.
Now wanting to find the icon image file to use again, I cannot find it anywhere! I have trawled through all the project files looking for the image file or a ref to its location, but have found nothing; except for:
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
When running the application the icon is still clearly visible in the applications taskbar tile.
Does anyone know where the icon file is stored / how I can retrieve it?
Thank you in advance.
It is stored in "{Your_project_name}.{Form_name}.resources" file. Search inside the "obj" folder which is in your project folder.
Now open the command prompt of Visual Studio. We will convert this ".resources" file into a ".resx" file. We use "resgen" command here.
resgen foo.resources bar.resx
The .resx can then be added to a C# project. You can find your icon file there.

Custom desktop icon with inno setup

I have the following in my inno setup file which creates a desktop icon no problem:
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"
However, the main file that launches the program is a VBS file rather than an EXE. I'd like to have a nice icon on the shortcut rather than the VBScript one, but can't find an option to change the icon.
Is there such an option available to set a custom icon??
The Inno-Setup help about the [Icons] section says:
IconFilename
The filename of a custom icon (located on the user's
system) to be displayed. This can be an executable image (.exe, .dll)
containing icons or a .ico file. If this parameter is not specified or
is blank, Windows will use the file's default icon. This parameter can
include constants.
Example: IconFilename: "{app}\myicon.ico"
(source)
Hope that helps.
You pasted the [Task] entry whereas the [Icons] entry is what creates the actual icon.
For that, you want to install a custom icon file, and set the IconFilename (and optionally IconIndex) parameter.
Before you use Inno setup, change the .exe icon with windows platform. After you change it then use Inno, and your .exe file becomes the icon that you have changed before using Inno.
In other words: Inno setup uses default icon to launch as a .exe icon, so you can change the icon before use Inno. It works for me.

WindowIcon not showing up despite being valid in resource (and used elsewhere)

In my last question (Qt/C++: Icons not showing up when program is run) I asked how to get an icon to show up on a toolbar and was told I needed a Qt Resource, which I added and that fixed my problem, the icon did show up on the toolbar.
Now I'm trying to set the title icon of a window, using the same resource file, and it shows up fine in the Qt preview viewer but blank in the actual program. I am using a MainWindow which has an MDIArea and the children are MainWindows as well; neither the parent MDI nor child MDI windows icons will show properly. On the parent, I see the regular "Windows Application icon" and on the child, the icon is completely blank.
How can I solve this?
You will have to go through a standard resource file for windows. (That is, a .rc)
The process (as described in the documentation) is:
Store the ICO file in your application's source code directory, for
example, with the name myappico.ico. Then, create a text file called,
say, myapp.rc in which you put a single line of text:
IDI_ICON1 ICON DISCARDABLE "myappico.ico"
Finally, assuming you are using qmake to generate your makefiles, add this line to your myapp.pro
file: RC_FILE = myapp.rc
Regenerate your makefile and your application. The .exe file will now be represented with your icon in Explorer.
In the Visual Studio case you're simply able to add a resource to your project.

Resources