Jump to content

[Resolved] Icon error


hcI
 Share

Recommended Posts

Hello everyone !

I'm doing 2 different program and i think there is a bug..

On my first code, the window icon work and on the second nothing work, icon (in the window) and icon (of the window)

For the window's icon of the both, it's 

GUISetIcon(@ProgramFilesDir & "\PrimoDevDesign\Primo_DevDesign.ico", -1)

and for the icons inside the window it's

Global $ico_dev = GUICtrlCreateIcon(@ProgramFilesDir & "\PrimoDevDesign","img_dev.ico", -0, 8, 80, 64, 64)
Global $ico_des = GUICtrlCreateIcon(@ProgramFilesDir & "\PrimoDevDesign\img_des.ico", -0, 8, 160, 64, 64)

and nothing appear when i launch

    - from the icon folder (i now it don't change anything but it's maybe a bug so i supposed it would be the solution.. but no)

    - from a desktop folder

It's really weird for me so if someone know why and/or how to fix it..

Edited by hcI
Problem resolved
Link to comment
Share on other sites

  • Developers

Are you sure this one is coded correct?

Global $ico_dev = GUICtrlCreateIcon(@ProgramFilesDir & "\PrimoDevDesign","img_dev.ico", -0, 8, 80, 64, 64)

or should it be:

Global $ico_dev = GUICtrlCreateIcon(@ProgramFilesDir & "\PrimoDevDesign\img_dev.ico", -0, 8, 80, 64, 64)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers
2 minutes ago, hcI said:

PS: The file / icon name for the paths are correct

Are you sure? How are running the script and what is the ICO location?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

The icos folder is C:\Program Files (x86)\PrimoDevDesign

And here's the 2 script :

The one who display an icon and an jpg image :

Spoiler
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ###
Global $GUI_1 = GUICreate("Primo.DevDesign", 324, 488, 192, 124)
Global $mnu_1_acceuil = GUICtrlCreateMenu("&Acceuil")
Global $mnu_1_proj = GUICtrlCreateMenu("&Projets")
Global $mnu_1_info = GUICtrlCreateMenu("A Propos")
GUISetIcon(@ProgramFilesDir & "\PrimoDevDesign\Primo_DevDesign.ico", -1)
GUISetBkColor(0x2D2D2D)
Global $lb_acceuil = GUICtrlCreateLabel("ACCEUIL", 80, 32, 156, 43, BitOR($SS_CENTER,$SS_CENTERIMAGE))
GUICtrlSetFont(-1, 24, 400, 0, "Constantia")
GUICtrlSetColor(-1, 0xFFFFFF)
GUICtrlSetBkColor(-1, 0x1B1918)
Global $lb_nom = GUICtrlCreateLabel("·Primo.DevDesign", 0, 360, 314, 41, $SS_CENTER)
GUICtrlSetFont(-1, 24, 800, 0, "Constantia")
GUICtrlSetColor(-1, 0xFFFFFF)
Global $Pic1 = GUICtrlCreatePic(@ProgramFilesDir & "\PrimoDevDesign\Primo_DevDesign.jpg", 48, 112, 228, 222)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
WEnd

 

And the one who sucks :

Spoiler
#include <GUIConstantsEx.au3>
#include <StaticConstants.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=C:\Users\hcI_2\Desktop\Projets termines\Autoit\[Projet]Primo.DevDesign\A Propos\GUI1.kxf
Global $GUI1 = GUICreate("A Propos", 371, 436, -1, -1)
GUISetIcon(@ProgramFilesDir & "\PrimoDevDesign\Primo_DevDesign.ico", -1)
GUISetFont(30, 400, 0, "MS Sans Serif")
GUISetBkColor(0x2D2D2D)
Global $lb_info = GUICtrlCreateLabel("Informations", 0, 8, 367, 54, $SS_CENTER)
GUICtrlSetFont(-1, 28, 400, 4, "Kozuka Gothic Pro R")
GUICtrlSetColor(-1, 0xB3B3B3)
Global $lb_1dev = GUICtrlCreateLabel("Le Développeur :", 88, 104, 162, 32)
GUICtrlSetFont(-1, 16, 400, 4, "Kozuka Gothic Pro R")
GUICtrlSetColor(-1, 0xB3B3B3)
Global $lb_2dev = GUICtrlCreateLabel("Jérémie", 256, 104, 88, 36)
GUICtrlSetFont(-1, 18, 400, 0, "Kozuka Gothic Pro R")
GUICtrlSetColor(-1, 0x881C1C)
Global $ico_dev = GUICtrlCreateIcon(@ProgramFilesDir & "\PrimoDevDesign\img_dev.ico", -0, 8, 80, 64, 64)
Global $ico_des = GUICtrlCreateIcon(@ProgramFilesDir & "\PrimoDevDesign\img_des.ico", -0, 8, 160, 64, 64)
Global $lb_1des = GUICtrlCreateLabel("Le Designer :", 80, 192, 125, 32)
GUICtrlSetFont(-1, 16, 400, 4, "Kozuka Gothic Pro R")
GUICtrlSetColor(-1, 0xB3B3B3)
Global $lb_2des = GUICtrlCreateLabel("Thomas", 208, 192, 89, 36)
GUICtrlSetFont(-1, 18, 400, 0, "Kozuka Gothic Pro R")
GUICtrlSetColor(-1, 0x881C1C)
Global $lb_site = GUICtrlCreateLabel("Site officiel"&@CRLF&"Coming Soon...", 0, 248, 367, 82, $SS_CENTER)
GUICtrlSetFont(-1, 24, 400, 0, "Kozuka Gothic Pro R")
GUICtrlSetColor(-1, 0xB3B3B3)
Global $lb_1mail = GUICtrlCreateLabel("Adresse e-mail pro", 0, 360, 365, 30, $SS_CENTER)
GUICtrlSetFont(-1, 12, 400, 0, "Kozuka Gothic Pro R")
GUICtrlSetColor(-1, 0xB3B3B3)
Global $lb_2mail = GUICtrlCreateLabel("primo.devdesign@hotmail.fr", -8, 392, 377, 36, $SS_CENTER)
GUICtrlSetFont(-1, 18, 400, 0, "Kozuka Gothic Pro R")
GUICtrlSetColor(-1, 0x881C1C)
GUISetState(@SW_SHOW)
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE
            Exit

    EndSwitch
 WEnd

 

 

Link to comment
Share on other sites

  • Developers

Script looks ok and works when using ICO files that are available:

Global $ico_dev = GUICtrlCreateIcon(@ProgramFilesDir & "\AutoIt3\Icons\au3.ico", -0, 8, 80, 64, 64)
;~ Global $ico_dev = GUICtrlCreateIcon(@ProgramFilesDir & "\PrimoDevDesign\img_dev.ico", -0, 8, 80, 64, 64)
Global $ico_des = GUICtrlCreateIcon(@ProgramFilesDir & "\AutoIt3\Icons\au3.ico", -0, 8, 160, 64, 64)
;~ Global $ico_des = GUICtrlCreateIcon(@ProgramFilesDir & "\PrimoDevDesign\img_des.ico", -0, 8, 160, 64, 64)

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

They do show for me without any issue. Show me your SciTE Outputpane infomation that is created when running the script.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Huh.. the outputpane ?.. I think it's this, am I right ?

>"C:\Program Files (x86)\AutoIt3\SciTE\..\AutoIt3.exe" "C:\Program Files (x86)\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.au3" /run /prod /ErrorStdOut /in "C:\Users\hcI_2\Desktop\Projets termines\Autoit\[Projet]Primo.DevDesign\A Propos\info.au3" /UserParams    
+>21:32:40 Starting AutoIt3Wrapper v.16.612.1119.0 SciTE v.3.5.4.0   Keyboard:0000040C  OS:WIN_10/  CPU:X64 OS:X64  Environment(Language:040C)  CodePage:0  utf8.auto.check:4
+>         SciTEDir => C:\Program Files (x86)\AutoIt3\SciTE   UserDir => C:\Users\hcI_2\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\hcI_2\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:C:\Program Files (x86)\AutoIt3  input:C:\Users\hcI_2\Desktop\Projets termines\Autoit\[Projet]Primo.DevDesign\A Propos\info.au3
+>21:32:40 AU3Check ended.rc:0
>Running:(3.3.14.2):C:\Program Files (x86)\AutoIt3\autoit3_x64.exe "C:\Users\hcI_2\Desktop\Projets termines\Autoit\[Projet]Primo.DevDesign\A Propos\info.au3"    
--> Press Ctrl+Alt+Break to Restart or Ctrl+Break to Stop

 

Edited by hcI
Link to comment
Share on other sites

  • Developers

Why are you running the X64 version of Auto3 in stead of the x86?
You probably compile a x86 version, hence that works.

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

The default is x86 unless you changed that during installation.

Just run the installer again and use the default 32bits x86 setup.

Jos 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Yes I know but the reason is simple: https://en.wikipedia.org/wiki/Coat_of_arms_of_the_Netherlands

(some history lesson)

 

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

I had no idea about 1810-1813, that was a short lived non-existence.

And does any ruler (currently) have the power to annex their entire country to another? That seems crazy to have lasted for a minute without complete military support or dominance.

 

Edited by iamtheky
clarifying all statements

,-. .--. ________ .-. .-. ,---. ,-. .-. .-. .-.
|(| / /\ \ |\ /| |__ __||| | | || .-' | |/ / \ \_/ )/
(_) / /__\ \ |(\ / | )| | | `-' | | `-. | | / __ \ (_)
| | | __ | (_)\/ | (_) | | .-. | | .-' | | \ |__| ) (
| | | | |)| | \ / | | | | | |)| | `--. | |) \ | |
`-' |_| (_) | |\/| | `-' /( (_)/( __.' |((_)-' /(_|
'-' '-' (__) (__) (_) (__)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...