Jump to content

status bar icone always magnify


faustf
 Share

Recommended Posts

hi  guy  i   have little problem  status bar

i try to put  inside  them a icon  16x16  but  always  have  a big  dimension  when visualize a gui 

this is my code 

Func _Gui()


    $hMainGUI = GUICreate("GesT", 1692, 808, 192, 114, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_THICKFRAME))

    _Menu() ; menu fico

    ;$Group1 = GUICtrlCreateGroup("Configurazione Azienda e Documenti", 2, 12, 1686, 773)
    $Group1 = GUICtrlCreateGroup("Configurazione Azienda e Documenti", 0, 12, 1692, 757)
    Local $aParts[3] = [75, 150, -1]
    $StatusBar1 = _GUICtrlStatusBar_Create($hMainGUI)
    _GUICtrlStatusBar_SetParts($StatusBar1, $aParts)
    _GUICtrlStatusBar_SetText($StatusBar1, "Offline")
    ;_GUICtrlStatusBar_SetText($StatusBar1, "Part 2", 1)
;Local  $ahIcons =  _WinAPI_ExtractIcon($DLL_LOCATE, 79);, 0, 0, 0)
;MsgBox (0,'icon',$ahIcons)
    _GUICtrlStatusBar_SetIcon ($StatusBar1, 0, _WinAPI_ExtractIcon($DLL_LOCATE, 78))
    GUISetState(@SW_SHOW)
    GUIRegisterMsg($WM_SIZE, "WM_SIZE")

    GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
    GUICtrlSetOnEvent($ExitItem, "_close")
    GUICtrlSetOnEvent($Dead, "_dead") ; il morto del mese
    ;Tools
    GUICtrlSetOnEvent($CalcItem, "_calc") ; calcolatrice
    GUICtrlSetOnEvent($scan2pdf, "_scan2pdf") ; scan 2 pdf
    GUICtrlSetOnEvent($codfisc, "_codfi") ; codice fiscale
    ;Cartelle
    GUICtrlSetOnEvent($Folder_invoice, "_folder_invoice") ; fattura di vendita
    GUICtrlSetOnEvent($Folder_invoice_buy, "_folder_invoice_buy") ; fattura di acquisto
    GUICtrlSetOnEvent($Folder_bank, "_folder_bank") ; scansione banca
    GUICtrlSetOnEvent($Fodler_quote, "_folder_quote") ; preventivi
    GUICtrlSetOnEvent($Folder_DDT, "_folder_ddt") ; ddt
    GUICtrlSetOnEvent($Fodler_Equitalia, "_folder_equitalia") ; equitalia
    GUICtrlSetOnEvent($Fodler_inps, "_folder_inps") ; inps
    GUICtrlSetOnEvent($Fodler_lago, "_folder_lago") ; commercialista
    GUICtrlSetOnEvent($Fodler_REport, "_folder_report") ; report
    ;configurazione
    GUICtrlSetOnEvent($config_menu, "_config_azienda") ; report
EndFunc   ;==>_Gui

i attach a  foto  , thankz  at  all

 

Untitled.png

Link to comment
Share on other sites

make a runable reproducer which shows the issue. Your snipet (with added needed includes) isn't runable:

>"C:\Program Files\AutoIt3\SciTE\AutoIt3Wrapper\AutoIt3Wrapper.exe" /run /prod /ErrorStdOut /in "C:\Users\Bert\AutoIt3.My\Temp\aa.au3" /UserParams    
+>11:21:46 Starting AutoIt3Wrapper v.14.801.2025.0 SciTE v.3.4.4.0   Keyboard:00000407  OS:WIN_81/  CPU:X64 OS:X64    Environment(Language:0407)
+>         SciTEDir => C:\Program Files\AutoIt3\SciTE   UserDir => C:\Users\Bert\AppData\Local\AutoIt v3\SciTE\AutoIt3Wrapper   SCITE_USERHOME => C:\Users\Bert\AppData\Local\AutoIt v3\SciTE 
>Running AU3Check (3.3.14.2)  from:C:\Program Files\AutoIt3  input:C:\Users\Bert\AutoIt3.My\Temp\aa.au3
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(22,79) : warning: $DLL_LOCATE: possibly used before declaration.
    _GUICtrlStatusBar_SetIcon ($StatusBar1, 0, _WinAPI_ExtractIcon($DLL_LOCATE,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(27,32) : warning: $ExitItem: possibly used before declaration.
    GUICtrlSetOnEvent($ExitItem,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(28,28) : warning: $Dead: possibly used before declaration.
    GUICtrlSetOnEvent($Dead,
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(30,32) : warning: $CalcItem: possibly used before declaration.
    GUICtrlSetOnEvent($CalcItem,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(31,32) : warning: $scan2pdf: possibly used before declaration.
    GUICtrlSetOnEvent($scan2pdf,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(32,31) : warning: $codfisc: possibly used before declaration.
    GUICtrlSetOnEvent($codfisc,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(34,38) : warning: $Folder_invoice: possibly used before declaration.
    GUICtrlSetOnEvent($Folder_invoice,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(35,42) : warning: $Folder_invoice_buy: possibly used before declaration.
    GUICtrlSetOnEvent($Folder_invoice_buy,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(36,35) : warning: $Folder_bank: possibly used before declaration.
    GUICtrlSetOnEvent($Folder_bank,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(37,36) : warning: $Fodler_quote: possibly used before declaration.
    GUICtrlSetOnEvent($Fodler_quote,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(38,34) : warning: $Folder_DDT: possibly used before declaration.
    GUICtrlSetOnEvent($Folder_DDT,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(39,40) : warning: $Fodler_Equitalia: possibly used before declaration.
    GUICtrlSetOnEvent($Fodler_Equitalia,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(40,35) : warning: $Fodler_inps: possibly used before declaration.
    GUICtrlSetOnEvent($Fodler_inps,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(41,35) : warning: $Fodler_lago: possibly used before declaration.
    GUICtrlSetOnEvent($Fodler_lago,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(42,37) : warning: $Fodler_REport: possibly used before declaration.
    GUICtrlSetOnEvent($Fodler_REport,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(44,35) : warning: $config_menu: possibly used before declaration.
    GUICtrlSetOnEvent($config_menu,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(22,79) : error: $DLL_LOCATE: undeclared global variable.
    _GUICtrlStatusBar_SetIcon ($StatusBar1, 0, _WinAPI_ExtractIcon($DLL_LOCATE,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(27,32) : error: $ExitItem: undeclared global variable.
    GUICtrlSetOnEvent($ExitItem,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(28,28) : error: $Dead: undeclared global variable.
    GUICtrlSetOnEvent($Dead,
~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(30,32) : error: $CalcItem: undeclared global variable.
    GUICtrlSetOnEvent($CalcItem,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(31,32) : error: $scan2pdf: undeclared global variable.
    GUICtrlSetOnEvent($scan2pdf,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(32,31) : error: $codfisc: undeclared global variable.
    GUICtrlSetOnEvent($codfisc,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(34,38) : error: $Folder_invoice: undeclared global variable.
    GUICtrlSetOnEvent($Folder_invoice,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(35,42) : error: $Folder_invoice_buy: undeclared global variable.
    GUICtrlSetOnEvent($Folder_invoice_buy,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(36,35) : error: $Folder_bank: undeclared global variable.
    GUICtrlSetOnEvent($Folder_bank,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(37,36) : error: $Fodler_quote: undeclared global variable.
    GUICtrlSetOnEvent($Fodler_quote,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(38,34) : error: $Folder_DDT: undeclared global variable.
    GUICtrlSetOnEvent($Folder_DDT,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(39,40) : error: $Fodler_Equitalia: undeclared global variable.
    GUICtrlSetOnEvent($Fodler_Equitalia,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(40,35) : error: $Fodler_inps: undeclared global variable.
    GUICtrlSetOnEvent($Fodler_inps,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(41,35) : error: $Fodler_lago: undeclared global variable.
    GUICtrlSetOnEvent($Fodler_lago,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(42,37) : error: $Fodler_REport: undeclared global variable.
    GUICtrlSetOnEvent($Fodler_REport,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(44,35) : error: $config_menu: undeclared global variable.
    GUICtrlSetOnEvent($config_menu,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(11,11) : error: _Menu(): undefined function.
    _Menu()
~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(24,39) : error: WM_SIZE(): undefined function.
    GUIRegisterMsg($WM_SIZE, "WM_SIZE")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(26,45) : error: _close(): undefined function.
    GUISetOnEvent($GUI_EVENT_CLOSE, "_close")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(28,37) : error: _dead(): undefined function.
    GUICtrlSetOnEvent($Dead, "_dead")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(30,41) : error: _calc(): undefined function.
    GUICtrlSetOnEvent($CalcItem, "_calc")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(31,45) : error: _scan2pdf(): undefined function.
    GUICtrlSetOnEvent($scan2pdf, "_scan2pdf")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(32,41) : error: _codfi(): undefined function.
    GUICtrlSetOnEvent($codfisc, "_codfi")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(34,57) : error: _folder_invoice(): undefined function.
    GUICtrlSetOnEvent($Folder_invoice, "_folder_invoice")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(35,65) : error: _folder_invoice_buy(): undefined function.
    GUICtrlSetOnEvent($Folder_invoice_buy, "_folder_invoice_buy")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(36,51) : error: _folder_bank(): undefined function.
    GUICtrlSetOnEvent($Folder_bank, "_folder_bank")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(37,53) : error: _folder_quote(): undefined function.
    GUICtrlSetOnEvent($Fodler_quote, "_folder_quote")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(38,49) : error: _folder_ddt(): undefined function.
    GUICtrlSetOnEvent($Folder_DDT, "_folder_ddt")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(39,61) : error: _folder_equitalia(): undefined function.
    GUICtrlSetOnEvent($Fodler_Equitalia, "_folder_equitalia")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(40,51) : error: _folder_inps(): undefined function.
    GUICtrlSetOnEvent($Fodler_inps, "_folder_inps")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(41,51) : error: _folder_lago(): undefined function.
    GUICtrlSetOnEvent($Fodler_lago, "_folder_lago")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(42,55) : error: _folder_report(): undefined function.
    GUICtrlSetOnEvent($Fodler_REport, "_folder_report")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(44,54) : error: _config_azienda(): undefined function.
    GUICtrlSetOnEvent($config_menu, "_config_azienda")
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^
"C:\Users\Bert\AutoIt3.My\Temp\aa.au3"(47,5) : error: gui(): undefined function.
gui()
~~~~^
C:\Users\Bert\AutoIt3.My\Temp\aa.au3 - 34 error(s), 16 warning(s)
!>11:21:47 AU3Check ended. Press F4 to jump to next error.rc:2
+>11:21:47 AutoIt3Wrapper Finished.
>Exit code: 2    Time: 1.485

and why should anybody invest more time to help you as you did by posting the snipet?

 

When i delete all error producing lines and use shell32.dll for icon it works:

#include <GuiStatusBar.au3>
#include <WinAPIRes.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>

Func _Gui()


    $hMainGUI = GUICreate("GesT", 640, 480, Default, Default, BitOR($GUI_SS_DEFAULT_GUI, $WS_SIZEBOX, $WS_THICKFRAME))
    Local $aParts[3] = [75, 150, -1]
    $StatusBar1 = _GUICtrlStatusBar_Create($hMainGUI)
    GUISetState(@SW_SHOW)
    _GUICtrlStatusBar_SetParts($StatusBar1, $aParts)
    _GUICtrlStatusBar_SetText($StatusBar1, "Offline")
    _GUICtrlStatusBar_SetIcon ($StatusBar1, 0,  23, "shell32.dll")
    Do
    Until GUIGetMsg()=-3

EndFunc   ;==>_Gui

_gui()

39_GesT.jpg.d542fe6d48f69d7ea5d426276d73

Edited by AutoBert
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...