qb64

How to set Title Bar Text and Application Icon


I want to make my QB64 program look professional, by setting a custom text in the Title Bar rather than the default (file name) and a custom Icon for the application file to be displayed in the Taskbar and Title Bar.

I tried to use Resource Hacker but couldn't change the icon.


Solution

  • Just add the following code at the top of your program:

    $EXEICON = 'path/to/icon-image'
    _TITLE "Title Bar Text"
    

    Note: The icon image must be in .ico format and the path should be correct, or else the program won't compile!