BoxShut and Icon Name Change
Keywords: boxshut icon name
Question:
After the BoxShut command, I get a Winbatch icon with the title "INFO" and it disappears when at the end of the program.Here's some sample code:
;Debug(@ON) WinHide("") ERRORMODE(@OFF) TIME=DATETIME() TIME1=StrSub(TIME,4,5) FILE="N#WORD" CR=Num2Char(13) LF=Num2Char(10) Anzahl=0 PARAM1=0 Zaehler1=0 BoxOpen("-INFO","- %ANWEND% -- wird nun gestartet %CR%%lf% bitte warten") BoxShut()ANSWER:
When you use BoxOpen() you are unhiding the WBT initially hidden with WinHide(""). You then change the title of the Box (and WBT) to -INFO with the first part of your BoxOpen("-INFO","") command. The WBT is now unhidden and has the name -INFO. When you use BoxShut() you return the WBT to its natural state as an icon with its new -INFO name.Try this:
;Debug(@ON) WinHide("") MyName=WinName() ;Add this line ERRORMODE(@OFF)Continue with your code until:
BoxShut() WinTitle("",MyName) ;Add these two lines WinHide("") ;after your BoxShut() ERRORMODE(@CANCEL)
Article ID: W12756Filename: BoxShut and Iconized Name Change.txt