GUIs with Progress: 'ExitApp' does not stop Keysharp.exe process

Issue #98 closed
Winter Laite created an issue

ISSUE: Keysharp.exe process must be manually killed after ‘Close’ button of GUI is pressed.

TEST CODE:

MyGui := Gui(, "Progress")
MyGui.OnEvent("Close", "CloseMe")
MyProgress := MyGui.Add("Progress", "x20 y20 w436 h36")


MyGui.Show("w480" "h80")
value := 0
While True {
     if (value >= 33) and (value <= 66) {
        MyProgress.Opt("cPurple")
     }
     else if (value >= 66) {
        MyProgress.Opt("cAqua")
    }       
     else {
        MyProgress.Opt("cBlack")
    }
    MyProgress.Value := value
    value := value + 1
    if (value > 100)
    {
            Sleep(1000)
            value := 0
    }
    Sleep(100)
}

CloseMe() {
    ExitApp()
}

The issue is not readily apparent, as the Keysharp icon does disappear from the tray. TaskManager will show that Keysharp remains running.

Comments (4)

  1. Log in to comment