Vb SHELL access to the problem of pid, the second "~ ~ ~
Time:09-18
In VB call an external application with SHELL for pid problem:
Private Sub Command1_Click () Pid=Shell (" C: \ Program Files \ Internet Explorer \ iexplore ", vbNormalFocus) End Sub
First open in Windows 7 and XP is no problem,
But when click on the command1 button again, open the Windows task manager, found a strange problem:
Prerequisite browser are IE8 1, in Windows 7, Windows task manager new process pid ie do not tally with the return of pid; 2, in Windows XP, Windows task manager won't add the ie process;
So I cannot pid for IE next shut, strives for the solution (note that I want to open multiple browser Windows),
CodePudding user response:
Then watch carefully and accurately whether in XP or Windows 7 to run for the first time in the task manager will generate a new process, IE shell can also capture normal to But the second and third run shell when there is a new IE process in task manager will be temporary, but immediately and disappeared, Since process are gone, so won't be able to complete the specified window closed,
================================================== Thinking: just click on the desktop the IE icon in the task manager will create a new process of IE, why can't in VB by shell?
CodePudding user response:
There is nothing wrong with machine measured.
CodePudding user response:
I try out, add/new can solve, that is, Pid=Shell (" C: \ Program Files \ Internet Explorer \ iexplore exe/new ", vbNormalFocus)
But the problem comes again, this is the right to obtain the pid (follow-up process can also be closed), but at the same time open ie will have direct access to http://new, it should be how to write in here?
CodePudding user response:
Miserable is parameters can only/new writing, can't change - new, masters, how to solve?