-
Take a look at this article, it should be helpful to you.
-
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.
-
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.
-
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.
-
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.
-
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.
-
getwindowthreadprocessid
This function can get the PID
-
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
-
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).
-
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
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
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
View menu Header and Footer command Delete content from header and footer separately Close the Header Footer dialog box. >>>More
Organic fluorescent brighteners are safe and reliable. Don't worry.
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!!