Difference between revisions of "$EXEICON"

From QB64 Wiki
Jump to navigation Jump to search
imported>Clippy
m
m (Text replacement - "{{Parameters}}" to "{{PageParameters}}")
 
(5 intermediate revisions by 2 users not shown)
Line 3: Line 3:


{{PageSyntax}}
{{PageSyntax}}
::: '''$EXEICON:''' 'iconfile.ico'
: [[$EXEICON]]:'{{Parameter|iconfile.ico}}'




{{Parameters}}
{{PageParameters}}
* The filename must use an icon extension .ICO inside of apostrophies
* '{{Parameter|iconfile.ico}}' is a valid [https://en.wikipedia.org/wiki/ICO_(file_format) ICO file]




{{PageDescription}}
{{PageDescription}}


* [[_ICON]] can designate an alternate window image or use the embedded image without any image handle.
* Calling [[_ICON]] without an {{Parameter|imageHandle&}} uses the embeded icon, if available.
** Starting with '''build 20170906/64''', the window will automatically use the icon embedded by [[$EXEICON]], without having to call _ICON.
* '''[[Keywords_currently_not_supported_by_QB64#Keywords_Not_Supported_in_Linux_or_MAC_OSX_versions|Keyword Not Supported in Linux or MAC versions]]'''.




{{PageExamples}}
''Example:'' Embeds a designated icon file into the compiled EXE which can be viewed in Windows Explorer folders.
''Example:'' Embeds a designated icon file into the compiled EXE which can be viewed in Windows Explorer folders.
{{CodeStart}}
{{CodeStart}}
{{Cl|$EXEICON}}:'mush.ico'
{{Cl|$EXEICON}}:'mush.ico'
{{Cl|_ICON}}
{{Cl|_ICON}}
{{Cl|_TITLE}} "Mushroom Kingdom"
{{Cl|SCREEN}} {{Cl|_NEWIMAGE}}(320, 200, 32)
{{Cl|WHILE}} {{Cl|NOT}} _{{Cl|SCREEN}}EXISTS: {{Cl|WEND}}
{{Cl|_DELAY}} .5
{{Cl|_FONT}} 16
{{Cl|COLOR}} {{Cl|_RGB32}}(255, 255, 255)
Center 6, "- Nintendo -"
{{Cl|_FONT}} 8
Center 13, "Presents"
{{Cl|PLAY}} "t160l16b>e"
{{Cl|_DELAY}} 1
i = 255
DO
    {{Cl|_LIMIT}} 20
    i = i - 10
    {{Cl|IF...THEN|IF}} i < 0 {{Cl|THEN}} {{Cl|EXIT DO}}
    {{Cl|COLOR}} {{Cl|_RGB32}}(i, i, i)
    {{Cl|_FONT}} 16
    Center 6, "- Nintendo -"
    {{Cl|_FONT}} 8
    Center 13, "Presents"
    {{Cl|_DISPLAY}}
{{Cl|LOOP}}
{{Cl|COLOR}} {{Cl|_RGB32}}(255, 255, 255)
{{Cl|END}}
{{Cl|SUB}} Center (row, t$)
    {{Cl|IF...THEN|IF}} {{Cl|LEN}}(t$) {{Cl|THEN}}
        {{Cl|_PRINTSTRING}} ({{Cl|_WIDTH (function)|_WIDTH}} \ 2 - ({{Cl|LEN}}(t$) * {{Cl|_FONTWIDTH}}) \ 2, (row * {{Cl|_FONTHEIGHT}}) - {{Cl|_FONTHEIGHT}}), t$
    {{Cl|END IF}}
{{Cl|END SUB}}
{{CodeEnd}}{{small|Code and command by Fellippe Heitor}}  
{{CodeEnd}}{{small|Code and command by Fellippe Heitor}}  
<center>[http://www.qb64.net/forum/index.php?action=dlattach;topic=13762.0;attach=4558 mush.ico download]</center>





Latest revision as of 12:45, 17 February 2021

$EXEICON pre-compiler metacommand embeds a designated icon file into the compiled EXE file to be viewed in Windows Explorer.


Syntax

$EXEICON:iconfile.ico


Parameters


Description


Examples

Example: Embeds a designated icon file into the compiled EXE which can be viewed in Windows Explorer folders.

$EXEICON:'mush.ico' _ICON

Code and command by Fellippe Heitor


See also




Navigation:
Keyword Reference - Alphabetical
Keyword Reference - By Usage
Main Wiki Page