Click here to Skip to main content
15,889,176 members
Home / Discussions / C#
   

C#

 
GeneralRe: how i can handle the close button Of Form Pin
DaveyM696-Jun-08 22:07
professionalDaveyM696-Jun-08 22:07 
QuestionBest fit algo Pin
deezZ6-Jun-08 19:07
deezZ6-Jun-08 19:07 
AnswerRe: Best fit algo Pin
Guffa7-Jun-08 0:03
Guffa7-Jun-08 0:03 
AnswerRe: Best fit algo Pin
Robert.C.Cartaino7-Jun-08 5:04
Robert.C.Cartaino7-Jun-08 5:04 
QuestionSeeing which thread owns a lock Pin
K.L.K6-Jun-08 18:53
K.L.K6-Jun-08 18:53 
QuestionProcess.Start C# Pin
satsumatable6-Jun-08 11:47
satsumatable6-Jun-08 11:47 
AnswerRe: Process.Start C# Pin
PIEBALDconsult6-Jun-08 13:24
mvePIEBALDconsult6-Jun-08 13:24 
QuestionProcess.Start on Vista return invalid Process Pin
dcabrames6-Jun-08 8:37
dcabrames6-Jun-08 8:37 
I try starting the default browser using the Process Class as follows:

Process p = Process.Start(GetDefaultBrowser(), "http://www.google.com");

I get back a Process object in 'p' Smile | :) but the 'HasExited' flag is true and the MainWindow handle is IntPtr.Zero.Confused | :confused: However the default browser did open (in this case IE7) and displayed Google's home page. Checking the PID of the this browser in Task Manager and it has a different PID then the PID in the 'p' object I received in the call to Process.Start() above.Confused | :confused: Confused | :confused:

I tried the alternate method of starting a Process as follows:

Process p = new Process();<br />
p.StartInfo.FileName = GetDefaultBrowser();<br />
p.StartInfo.Arguments = u.AbsoluteUri;<br />
p.Start();


and get the same result. WTF | :WTF:

I dug deeper and discovered that the process that launched the IE browser that is displayed on the desktop was a process called ieuser.exe. I would not mind so much but there is no way I can figure out what the new process is since the StartInfo of the new process is empty.

The same application does not have this problem on XP.

My first questions is what the heck is going on?

Secondly, does anyone know how to work around this either by ensuring the process I start is the one that runs or determining which Process is displaying the URL?

Regards
David
AnswerRe: Process.Start on Vista return invalid Process Pin
Giorgi Dalakishvili6-Jun-08 9:53
mentorGiorgi Dalakishvili6-Jun-08 9:53 
GeneralRe: Process.Start on Vista return invalid Process Pin
dcabrames6-Jun-08 10:20
dcabrames6-Jun-08 10:20 
GeneralRe: Process.Start on Vista return invalid Process Pin
Giorgi Dalakishvili6-Jun-08 10:32
mentorGiorgi Dalakishvili6-Jun-08 10:32 
GeneralRe: Process.Start on Vista return invalid Process Pin
dcabrames9-Jun-08 3:24
dcabrames9-Jun-08 3:24 
GeneralRe: Process.Start on Vista return invalid Process Pin
Giorgi Dalakishvili9-Jun-08 3:43
mentorGiorgi Dalakishvili9-Jun-08 3:43 
GeneralRe: Process.Start on Vista return invalid Process Pin
dcabrames9-Jun-08 5:01
dcabrames9-Jun-08 5:01 
GeneralRe: Process.Start on Vista return invalid Process Pin
Giorgi Dalakishvili9-Jun-08 5:13
mentorGiorgi Dalakishvili9-Jun-08 5:13 
QuestionWCF DataContractFormat for System.Exception Pin
bit_cmdr6-Jun-08 7:34
bit_cmdr6-Jun-08 7:34 
QuestionFile IO Pin
netJP12L6-Jun-08 5:40
netJP12L6-Jun-08 5:40 
AnswerRe: File IO Pin
Colin Angus Mackay6-Jun-08 5:59
Colin Angus Mackay6-Jun-08 5:59 
GeneralRe: File IO Pin
Spacix One6-Jun-08 9:09
Spacix One6-Jun-08 9:09 
GeneralRe: File IO Pin
Colin Angus Mackay6-Jun-08 9:50
Colin Angus Mackay6-Jun-08 9:50 
AnswerRe: File IO Pin
Spacix One19-Jun-08 2:28
Spacix One19-Jun-08 2:28 
QuestionPosting event or invoking callbacks on main thread Pin
Jim Crafton6-Jun-08 4:30
Jim Crafton6-Jun-08 4:30 
AnswerRe: Posting event or invoking callbacks on main thread Pin
leppie6-Jun-08 4:40
leppie6-Jun-08 4:40 
GeneralRe: Posting event or invoking callbacks on main thread Pin
Jim Crafton6-Jun-08 5:29
Jim Crafton6-Jun-08 5:29 
GeneralRe: Posting event or invoking callbacks on main thread Pin
leppie6-Jun-08 5:55
leppie6-Jun-08 5:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.