![]() |
|
LOOP remains active after closing via Task Bar cure - Printable Version +- PowerBASIC Users Meeting Point (https://pump.richheimer.de) +-- Forum: User to User Discussions (https://pump.richheimer.de/forumdisplay.php?fid=3) +--- Forum: Programming (https://pump.richheimer.de/forumdisplay.php?fid=7) +--- Thread: LOOP remains active after closing via Task Bar cure (/showthread.php?tid=143) |
LOOP remains active after closing via Task Bar cure - Dale Yarker - 18.10.2026 In a current project I'm using GRAPHIC WINDOW CLICK in a DO/LOOP. (Is similar to MODELESS pump and CALLBACK but only clicks not Windows messages) If I closed the window using right click on task bar icon compiling again failed because program is still running. (needed to close using Task Manager) The cure is API IsWindow (hWin) in the DO/LOOP. Code: 'Mouse click "pump"Use CON.MOUSE and CON.HANDLE for the above to work in PBCC. PBWIN has function ISWIN, but GRAPHIC WINDOW and TXT.WINDOW can also be created in PBCC which doesn't. related: Console programs can have a callback. See PBCC samples\Internet\TCP or \UDP. RE: LOOP remains active after closing via Task Bar cure - Borje Hagsten - 18.10.2026 You could also test DC (example below shows) and CLICK returns 2 for double clicks. As for text windows, subclassing is a way (works with Graphic Windows too) Code: FUNCTION PBMAIN () AS LONGText Window Subclassing: Code: #COMPILE EXERE: LOOP remains active after closing via Task Bar cure - Dale Yarker - 18.10.2026 Thanks, but the subject is curing program still running after closing by right click on task bar. I think your DO/LOOP example will fail to stop because there no EXIT LOOP or EXIT FUNCTION inside the loop. Cheers, RE: LOOP remains active after closing via Task Bar cure - Borje Hagsten - 18.10.2026 Tested and works, because of DO WHILE GRAPHIC(DC), where the DC becomes 0 when the Graphic window is destroyed so it exits DO. RE: LOOP remains active after closing via Task Bar cure - Dale Yarker - 18.10.2026
|