DreamVB Posted October 3, 2014 Posted October 3, 2014 hi I am trying to make a radio player. I done the design but for some odd reason my status bar is not showing. it will only show if I comment out the code that creates the menu. any idea why this is happening I left my GUI code below. Thanks expandcollapse popup#include <ButtonConstants.au3> #include <GUIConstantsEx.au3> #include <GUIListBox.au3> #include <GuiStatusBar.au3> #include <SliderConstants.au3> #include <StaticConstants.au3> #include <WindowsConstants.au3> $frmmain = GUICreate("DM MyRadio", 407, 411, -1, -1) $MenuItem1 = GUICtrlCreateMenu("MenuItem") $cmdplay = GUICtrlCreateButton("Play", 18, 258, 59, 49) GUICtrlSetColor(-1, 0x000000) $lblStations = GUICtrlCreateLabel("Current Stations", 12, 14, 95, 17) GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif") $lstStations = GUICtrlCreateList("", 8, 31, 361, 177, BitOR($GUI_SS_DEFAULT_LIST,$LBS_NOINTEGRALHEIGHT)) $lblTitleVol = GUICtrlCreateLabel("Volume", 11, 221, 39, 17) $lbl3dLine1 = GUICtrlCreateLabel("Label1", 0, 0, 406, 2, $SS_ETCHEDHORZ) $cmdPause = GUICtrlCreateButton("P&ause", 82, 258, 59, 49) GUICtrlSetColor(-1, 0x000000) $cmdStop = GUICtrlCreateButton("&Stop", 146, 258, 59, 49) $sVolume = GUICtrlCreateSlider(48, 215, 200, 27, BitOR($TBS_BOTH,$TBS_NOTICKS,$TBS_ENABLESELRANGE)) GUICtrlSetData(-1, 50) $lblVolume = GUICtrlCreateLabel("50%", 248, 222, 24, 17, $SS_CENTER) GUICtrlSetColor(-1, 0x000080) $lbl3dLine2 = GUICtrlCreateLabel("Label1", 20, 247, 327, 2, $SS_ETCHEDHORZ) $StatusBar1 = _GUICtrlStatusBar_Create($frmmain) _GUICtrlStatusBar_SetMinHeight($StatusBar1, 17) GUISetState(@SW_SHOW) While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE Exit EndSwitch WEnd On Error Resume Pulling Hair Out.
Solution Zedna Posted October 3, 2014 Solution Posted October 3, 2014 (edited) It seems that this is bug only in some versions of AutoIt. 3.2.12.1 - OK 3.3.12.0 - BUG 3.3.13.14 - OK There is simple workaround: ... $frmmain = GUICreate("DM MyRadio", 407, 411, -1, -1) $MenuItem1 = GUICtrlCreateMenu("MenuItem") ... $StatusBar1 = _GUICtrlStatusBar_Create($frmmain) GUIRegisterMsg($WM_SIZE, "WM_SIZE") GUISetState(@SW_SHOW) ... Func WM_SIZE($hWnd, $Msg, $wParam, $lParam) _GuiCtrlStatusBar_Resize($StatusBar1) Return $GUI_RUNDEFMSG EndFunc or this one: ... $frmmain = GUICreate("DM MyRadio", 407, 411, -1, -1) $MenuItem1 = GUICtrlCreateMenu("MenuItem") ... $StatusBar1 = _GUICtrlStatusBar_Create($frmmain) GUISetState(@SW_SHOW) _GuiCtrlStatusBar_Resize($StatusBar1) Edited October 3, 2014 by Zedna DreamVB 1 Resources UDF ResourcesEx UDF AutoIt Forum Search
DreamVB Posted October 3, 2014 Author Posted October 3, 2014 Thank you very much it was really bugging me Thanks again. On Error Resume Pulling Hair Out.
Moderators Melba23 Posted October 4, 2014 Moderators Posted October 4, 2014 DreamVB,Always worth a look in Trac to see if someone has already reported it. As you can see #2588 was fixed a while ago. M23 Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind Open spoiler to see my UDFs: Spoiler ArrayMultiColSort ---- Sort arrays on multiple columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now