Jump to content

Search the Community

Showing results for tags 'status bar'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • General
    • Announcements and Site News
    • Administration
  • AutoIt v3
    • AutoIt Help and Support
    • AutoIt Technical Discussion
    • AutoIt Example Scripts
  • Scripting and Development
    • Developer General Discussion
    • Language Specific Discussion
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Categories

  • AutoIt Team
    • Beta
    • MVP
  • AutoIt
    • Automation
    • Databases and web connections
    • Data compression
    • Encryption and hash
    • Games
    • GUI Additions
    • Hardware
    • Information gathering
    • Internet protocol suite
    • Maths
    • Media
    • PDF
    • Security
    • Social Media and other Website API
    • Windows
  • Scripting and Development
  • IT Administration
    • Operating System Deployment
    • Windows Client
    • Windows Server
    • Office

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Member Title


Location


WWW


Interests

Found 3 results

  1. Good evening everyone First, I want to apologize with you for the title not very clear, but I thought a little bit on which title to set at the thread, and this is the one that came in mind. Now, let me explain what I'm trying to understand. I am making an application ( with n clients ), with an SQLite Database, which has a Main form, and n sub-forms... Since these sub-forms are called several times, because they are used to add or update records to the Database, I put the code that generates the GUI of these sub-forms in Functions. There are two sub-forms which are "treated" as two main forms, since even them have n sub-forms, which perform various tasks. Where am I stucked? For the Main form I created a Status Bar, in order to display messages ( add/delete/update/search results ), and it works perfectly with all the forms which don't have other sub-forms. For the two forms, which indeed have n sub-forms, I created two separated Status Bars, which are (re)created everytime I call the function that then displays the form. Practically, I can't set icons to these two Status Bars, and I don't know why. I'm really sorry that I don't feel clear enough, so, here you are an example of what I am saying. I recreated exactly what my script does: #include <GuiButton.au3> #include <GUIConstantsEx.au3> #include <GuiStatusBar.au3> #include <WindowsConstants.au3> Opt("GUIOnEventMode", 1) Global $frmSubForm, _ $txtSubFormField, _ $sbSubFormStatusBar, _ $objSB_IconError = _WinAPI_LoadShell32Icon(109), _ $objSB_IconInformation = _WinAPI_LoadShell32Icon(277) #Region ### START Koda GUI section ### Form= $frmMainForm = GUICreate("Main Form", 300, 300, -1, -1) GUISetOnEvent($GUI_EVENT_CLOSE, "ExitApplication") $sbMainStatusBar = _GUICtrlStatusBar_Create($frmMainForm) $btnCreateSubForm = GUICtrlCreateButton("Create Sub Form", 105, 110, 75, 41, BitOR($BS_CENTER,$BS_VCENTER,$BS_MULTILINE)) GUICtrlSetOnEvent(-1, "GenerateSubForm") GUICtrlSetFont(-1, 10, 400, 0, "Arial") _GUICtrlStatusBar_SetSimple($sbMainStatusBar) _GUICtrlStatusBar_SetText($sbMainStatusBar, "") GUISetState(@SW_SHOW, $frmMainForm) #EndRegion ### END Koda GUI section ### While 1 Sleep(100) WEnd Func ExitApplication() Exit EndFunc Func GenerateSubForm() #Region ### START Koda GUI section ### Form= $frmSubForm = GUICreate("Sub-Form", 300, 300, -1, -1, -1, -1, $frmMainForm) GUISetOnEvent($GUI_EVENT_CLOSE, "DeleteSubForm") $txtSubFormField = GUICtrlCreateInput("", 0, 0, 100, 20) $btnCheckSubFormField = GUICtrlCreateButton("Check Field", 105, 110, 75, 41, BitOR($BS_CENTER,$BS_VCENTER,$BS_MULTILINE)) GUICtrlSetOnEvent(-1, "CheckSubFormField") GUICtrlSetFont(-1, 10, 400, 0, "Arial") $sbSubFormStatusBar = _GUICtrlStatusBar_Create($frmSubForm) _GUICtrlStatusBar_SetSimple($sbSubFormStatusBar) _GUICtrlStatusBar_SetText($sbSubFormStatusBar, "") GUISetState(@SW_SHOW, $frmSubForm) GUISetState(@SW_DISABLE, $frmMainForm) #EndRegion ### END Koda GUI section ### EndFunc Func DeleteSubForm() ; Declared Globally => $frmSubForm GUIDelete($frmSubForm) GUISetState(@SW_ENABLE, $frmMainForm) EndFunc Func WriteToStatusBar($sbStatusBar, $objSB_Icon, $strText) _GUICtrlStatusBar_SetIcon($sbStatusBar, 0, $objSB_Icon) _GUICtrlStatusBar_SetText($sbStatusBar, $strText) ConsoleWrite("Icon Handle: " & $objSB_Icon & @CRLF) EndFunc Func CheckSubFormField() ; Declared Globally => $txtSubFormField If GUICtrlRead($txtSubFormField) = "" Then ; Declared Globally => $sbStatusBar WriteToStatusBar($sbSubFormStatusBar, $objSB_IconError, "Field NOK.") Else WriteToStatusBar($sbSubFormStatusBar, $objSB_IconInformation, "Field OK.") EndIf EndFunc The text is set, but icon is not. Could someone please tell me why? Thanks everyone in advance Best Regards.
  2. Hi On a small script I made, I have a status bar created with: $stBar = _GUICtrlStatusBar_Create($MainForm) And it works perfectly. However, if I try to change the background color with: _GUICtrlStatusBar_SetBkColor($stBar, 0x0000FF) Nothing happens. The status bar Bk color remains the same (grey). Any ideas ?
  3. Hi I am trying to embed an icon control and an AVI control in the status bar but the problem is they won't retain their transparency. An example: #include <GuiStatusBar.au3> #include <GUIConstantsEx.au3> Global $WindowMain = GUICreate("Example", 351, 176, -1, -1) GUISetBkColor( 0xDDDDDD, $WindowMain ) Global $Statusbar = _GUICtrlStatusBar_Create($WindowMain) Global $Statusbar_PartsWidth[2] = [324, -1] _GUICtrlStatusBar_SetParts($Statusbar, $Statusbar_PartsWidth) _GUICtrlStatusBar_SetText($Statusbar, "", 0) _GUICtrlStatusBar_SetText($Statusbar, "", 1) _GUICtrlStatusBar_SetMinHeight($Statusbar, 20) GUISetState(@SW_SHOW) $Icon = GUICtrlCreateIcon('ico.ico',-1,300,130,16,16) ;Icon on GUI ;Without this the icon will not be tranparent. No idea why. GUICtrlSetState($icon, $GUI_SHOW) $Icon2 = GUICtrlCreateIcon('ico.ico',-1,10,10,16,16) _GUICtrlStatusBar_EmbedControl($Statusbar, 1, GUICtrlGetHandle($Icon2), 1+2) ; This has no effect. Icon has a white square around it GUICtrlSetState($icon2, $GUI_SHOW) $AVI = GUICtrlCreateAvi( 'avi.avi',0,250,130,16,16) GUICtrlSetState( $AVI, 1 ) $AVI2 = GUICtrlCreateAvi( 'avi.avi',0,250,130,16,16) GUICtrlSetState( $AVI2, 1 ) _GUICtrlStatusBar_EmbedControl($Statusbar, 0, GUICtrlGetHandle($AVI2), 1+2) Global $GuiMsg Do $GuiMsg = GUIGetMsg() Until $GuiMsg = $GUI_EVENT_CLOSE I've tried a couple of things like using _GUICtrlStatusBar_SetIcon() or GDIplus for icons and that works and the icons are transparent. As for the AVI, I tried faking a status bar by drawing some lines at the buttom of the window and that worked ok too, But I'd love to be able to use it with a real status bar. example.zip
×
×
  • Create New...