VB SHELL GETS THE PID ISSUE

Updated on technology 2024-04-08
10 answers
  1. Anonymous users2024-02-07

    Take a look at this article, it should be helpful to you.

  2. Anonymous users2024-02-06

    Strictly speaking, a distinction should be made between the PID and not the process name.

    If you are using an XP system, you can call the command tasklist nh fi in the shell"pid eq 2304", 2304 of which should have your PID information.

  3. Anonymous users2024-02-05

    The PID of that represents the process ID, and you can do a lot of things with this number. You can open the task manager and look at it, and the number is the pid column.

  4. Anonymous users2024-02-04

    Explorer only returns its own PID when it runs it for the first time, and when it runs again, it returns the PID of the resource it called. If you want to get the PID of the explorer itself in the VB, you need to kill the explorer process through the api function (at which point the desktop disappears), and then open it with the shell.

  5. Anonymous users2024-02-03

    Repeated runs are not allowed, you pid=shell(""The call actually fails, and when the error occurs, the return value is not pid, and you need to use another method to find the pid of an existing process.

  6. Anonymous users2024-02-02

    urprogram &

    echo $!

    If the parent process quits the raid after the urprogram fork, then God knows, except for a pure method that relies on luck like lap shed ps.

  7. Anonymous users2024-02-01

    getwindowthreadprocessid

    This function can get the PID

  8. Anonymous users2024-01-31

    The shell script gets its own pid is a $$ variable The python script gets the pid it runs is The function can refer to the following example**.

    Shell scripts.

    #! /bin/sh

    echo $$

    Python scripts.

    import os

    print

  9. Anonymous users2024-01-30

    First get all the windows on the taskbar, use getdesktopwindow getwindow to get the window handle on the taskbar, and then getwindowtext to get the window title in turn to filter your own process window, use getwindowthreadprocessid to get the process pid of the window, and then compare it with the pid you set, and then use showwindow setforegroundwindow and front-end (the pre-setting is setwindowpos).

  10. Anonymous users2024-01-29

    It's a good way to do it. I use the notepad program as an example, you first open the notepad program, add the following **, click the form.

    option explicit

    dim h as ole_handle, pid as ole_handle

    private declare function findwindow lib "user32" alias "findwindowa" (byval lpclassname as string, byval lpwindowname as string) as long

    private declare function getwindowthreadprocessid lib "user32" (byval hwnd as long, lpdwprocessid as long) as long

    private sub form_click()

    h = findwindow("notepad", vbnullstring)

    getwindowthreadprocessid h, pid

    shell "taskkill /pid " & pid

    end sub

Related questions
23 answers2024-04-08

Hello, I am Runxuan's psychology teacher, your situation is that the inner self is lost, always living under the external self, and the external self is changing at any time and unstable, so it will become what it is now over time; The outer self changes anytime and anywhere with your emotions, thoughts and feelings, and what you want to be your outer self will be, which is normal, and the hypocrisy you feel and the lack of longevity in love are all feelings brought to you by the change of the external self, so you need to understand, change and improve your inner self. Because the information you provided is not enough, I can only analyze it briefly based on my feelings, and it may not be comprehensive. >>>More

1 answers2024-04-08

One, pay attention to the number of questions, to keep asking questions, as many questions as possible, this is the basis of your score. Second, pay attention to the quality of the problem, on the premise of a large quantity, try to get close to the topic, and tell others what he wants to know most. Otherwise, it's a tank of water. >>>More

3 answers2024-04-08

View menu Header and Footer command Delete content from header and footer separately Close the Header Footer dialog box. >>>More

10 answers2024-04-08

Organic fluorescent brighteners are safe and reliable. Don't worry.

15 answers2024-04-08

I think so, because since she is like you, it means that she has you in her heart. Since she has you in her heart, why can't you pursue her? Besides, she's not married yet. As long as you are not married, it is fair, and there is a chance. Believe in yourself, you are charismatic!!