dzhw1.KillProcess("XX") side effect?

Discussion in 'Questions (Windows Mobile)' started by HARRY, Jan 31, 2008.

  1. HARRY

    HARRY Active Member Licensed User

    Hello,

    In a program I am writing I have to kill another program if it is running.
    The code is:

    If dzhw1.GetWindowHandle("Program2", "Program2" ) > 0 Then
    If Msgbox ("Now Kill Program2 ?","Routes",cMsgBoxYesNo, cMsgBoxQuestion)= cYes Then
    dzhw1.KillProcess("Program2")
    Return true
    Else
    Return false
    End If
    Else
    Return true
    End If

    This code works wel - the test works correct and the killing is done if applicable -, however, after the kill process the Close Button (X) of my program does not work anymore (disabled?).

    Anybody idea what is going wrong?

    Harry
     
  2. HARRY

    HARRY Active Member Licensed User

    dzhw1.KillProcess("XX") side effect?

    Some more information:

    In fact the whole title bar is locked. The program itself is still functioning; i.e. react on user actions. The only possibility to close the program or to do anything else is a soft reset.

    Harry
     
  3. Cableguy

    Cableguy Expert Licensed User

    Have you tried to force the focus back to you app?
     
  4. HARRY

    HARRY Active Member Licensed User

    Hello Cableguy,

    I don't know exactly what you mean; the application, killing the other one, continues to work. Only the 'environment' is frozen. I cannot stop the application, nor start another one on the PDA.

    Trying to find out more details, I just made a small test program on my desktop; with similar results. Ctrl/Alt/Del was necesssary to get my desktop again in a normal state.

    The program just has one form with one button and the following code :

    Sub App_Start
    Form1.Show
    d1.New1
    End Sub


    Sub Button1_Click
    d1.KillProcess("Explorer")
    End Sub

    The fact that this behaviour on the deskltop occurred once and that I cannot recreate it (on the desk top) , makes things more difficult.

    Harry
     
  5. dzt

    dzt Active Member Licensed User

  6. HARRY

    HARRY Active Member Licensed User

    dzhw1.KillProcess("XX") side effect?

    Hi Dimitris,

    Using Spy I found that the program I want to kill is not listed when Find Apps is done. It is a navigator program, which is in the minimized state. Are there specific program types in Windows, which are invisible for Spy or is that because it is minimized? Is that the reason of the strange behaviour of Mobile Windows after a Kill?

    Harry
     
  7. HARRY

    HARRY Active Member Licensed User

    Dimitris,

    More information. The program to kill is listed under Processses. When I kill the process using Spy, I get the same situation as when I kill that program with my own program: the PDA is frozen, apart from the Spy program. Only a soft reset make things running again.

    Harry
     
Loading...