Program that won't close
#7
Can you modify this to show the problem?
Code:
#DIM ALL
#INCLUDE "win32api.inc"
$ShellTo = "PAY.EXE"

FUNCTION PBMAIN () AS LONG

LOCAL hDlg AS DWORD

DIALOG NEW 0, "Test", , , 250, 100, _
        %WS_POPUP OR %WS_CAPTION OR %WS_SYSMENU OR %DS_MODALFRAME OR %DS_CENTER TO hDlg
DIALOG SHOW MODELESS hDlg CALL AggiornaXProc

DO
  DIALOG DOEVENTS
LOOP WHILE ISWIN(hdlg)
BEEP

END FUNCTION

CALLBACK FUNCTION AggiornaXProc() AS LONG
  LOCAL PID AS LONG
  SELECT CASE CB.MSG
   CASE %WM_SYSCOMMAND
    IF (CB.WPARAM AND &HFFF0) = %SC_CLOSE THEN
     PID = SHELL($ShellTo, 1)
    END IF
  END SELECT
END FUNCTION
Reply


Messages In This Thread
RE: Program that won't close - by Kurt Kuzba - 25.10.2026, 12:59
RE: Program that won't close - by Dale Yarker - 25.10.2026, 13:10
RE: Program that won't close - by Mike Doty - 25.10.2026, 15:48
RE: Program that won't close - by Mike Doty - 26.10.2026, 15:54

Forum Jump:


Users browsing this thread: 1 Guest(s)