F
F
flatcar2015-09-10 17:10:54
Pascal
flatcar, 2015-09-10 17:10:54

How to add an icon to an .exe program made in Pascal?

How to add an icon to an .exe program made in Pascal?
For example, to this one:
begin
writeln('Hello world');
end.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
N
Nikolai Ivanov, 2015-09-10
@lonestan

Go to the PascalABC.NET IDE and write identical code in the source code for the program.

uses System.Windows.Forms, System.Drawing;  
var 
    f: Form; 
begin 
    f := new Form(); 
    f.Icon := new Icon('c:\temp\my.ico'); 
  Application.Run(f); 
end.

A
Anton Fedoryan, 2015-09-11
@AnnTHony

Most likely not in the console. Take Delphi, Lazarus, or any other Pascal IDE with the ability to create forms.

Z
ZevsEHG, 2018-03-08
@ZevsEHG

1. Create a text file in the folder with your program (.exe) and icon (.ico)
2. Write there MAINICON ICON "Icon.ico" (instead of Icon Name of your icons)
3. change .txt to .rc
4. download the program Resource Builder here
5. open .rc in Resource Builder
6. select Tools->link to EXE from above
7. select EXE of your program

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question