WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Functions

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

BoxShut and WBT icon

Keywords: boxshut icon 

Question:

After I use the BoxShut command, a Winbatch icon with the title "INFO" appears, and then it disappears at the end of the script. Why? Here's my sample script:
	;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()

Article ID:   W13043
Filename:   BoxShut and WBT icon.txt
File Created: 1999:06:23:17:39:04
Last Updated: 1999:06:23:17:39:04