Msg Popup window does not close

Jan 7, 2015
4
0
#1
I have TC v17 on windows7, running a .btm in TCC tab, using a popup Msg box with 4 custom buttons for user to select. After selection, sometimes this window closes, sometimes not. An OKcancel 2 button Msg box for example always seems to close.
 
#3
Thanks for test. I'm using win7 64, and have a OKcancel msg box that follows the 4 button box so user can confirm their selection to procede. I'll break it down to these statements for another test.
 
#4
In a followup test, I find that the 4 button custom style msgbox window will not always close after button selection, with attach consoles option selected. Using TC v17.65 on windows7 64.
 

rconn

Administrator
Staff member
May 14, 2008
10,415
95
#5
In a followup test, I find that the 4 button custom style msgbox window will not always close after button selection, with attach consoles option selected. Using TC v17.65 on windows7 64.
I don't know what you're referring to -- the TCC MSGBOX command doesn't have an "attach consoles" option.

What is the exact command syntax you're using?
 
#6
I have the auto attach consoles (I believe this is the terminology used) selected from the main TCC options menu, yes nothing to do with msgbox command.
The .btm, for example, has 2 successive msgbox commands:
msgbox /1"Pc 1" /2"Pc 2" /3"Pc 3" /4"Pc 4" "Part Inspection" Select the part type
(logic to set %pick equal to button label)
msgbox OKCancel "Part Inspection" %pick selected
The first 4 button pop window does not always close.
 

rconn

Administrator
Staff member
May 14, 2008
10,415
95
#7
I tried your example 50 times and never saw the first msgbox fail to close.

Looking at the code, the only ways I can see for the close to fail is (1) a Windows API failure (unlikely), or (2) another app (like a screen manager) hooking the msgbox call (and failing to close). Given that MSGBOX is heavily used & this is the first report I've ever seen about it failing to close, I suspect there's a conflict with something else on your system.
 
#8
Funny ... The first command below produces the default message box sound; the second one doesn't. WAD?
Code:
v:\> msgbox /1"Pc 1" /2"Pc 2" /3"Pc 3" /4"Pc 4" "Part Inspection" Select the part type

v:\> msgbox OKCancel "Part Inspection" %pick selected
 

rconn

Administrator
Staff member
May 14, 2008
10,415
95
#9
Funny ... The first command below produces the default message box sound; the second one doesn't. WAD?
Code:
v:\> msgbox /1"Pc 1" /2"Pc 2" /3"Pc 3" /4"Pc 4" "Part Inspection" Select the part type

v:\> msgbox OKCancel "Part Inspection" %pick selected
WAD - they're not the same icon type. The first one is MB_ICONINFORMATION, the second is MB_ICONQUESTION. Windows has different default sounds for them. (TCC doesn't have anything to do with the sound, that's done by Windows.)