Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sequentially Open multiple Files into same Browser Window

Status
Not open for further replies.

aschi666

Programmer
Jul 11, 2005
66
DE
Hi!

I develop a Click- and Replay - Mechanism for our XML-Application- Server both using VisualC#.

To look at the Results I return HTML-Code for every Step that is processed by the XMLServer. One File per Step.

I now also want to open these Files in the Systems Standart-Browser using the following:
Code:
System.Diagnostics.Process proc = new System.Diagnostics.Process();

proc.EnableRaisingEvents=false;
					proc.StartInfo.FileName="iexplore";
					proc.StartInfo.Arguments=+sFileName+".html";
					
ibStarted = proc.Start();

This opens one Browser-Window for every single File. How can I make it use the same Window for all the Files?

Thank you in advance!

__________________________________________
a programmer is a tool that converts coffee into code...
aschi666, sthcomputing.de
 
This may be as simple as checking "Reuse windows when opening shortcuts" in the advanced settings of Internet Options in IE....

Rob

i'm a boy, called Bert, and I may not be crazy, but if i'm not the rest of you are...
 
sorry, but it's not that simple. i check the settings anyways, it's switched on.

i think if i do what i coded in the first post it always starts a new ie - process.

if i just

Code:
System.Diagnostics.Process.Start(this.is_app_path+"\\temp"+sFileName+".html");

it starts the system's standart - browser, but tells me, i can't find the file.

so this seems to me as if this was the right direction, but the missing file irritates me, it's there (it gets loaded if i use the upper code...).

what do i do wrong? has anybody ever done this before? i want all the files i create and load in one loop in the same browser-window to navigate through its history.

__________________________________________
a programmer is a tool that converts coffee into code...
aschi666, sthcomputing.de
 
I would recommend including the axwebbrowser control in your app.

This way, you can control the loading. You can also grab events like DocumentCompleted which is fired when the document has finished loading. This can be handy.

 
thx for your answer!

i already thought about integrating a browser - component, the thing is we don't really need to see the htmls in runtime, just for debugging purposes...

i do the exact same thing (open htmls sequentially in same browser - window) with powerbuilder 8 using shellexecute and this always opens files in the existing window or opens a new one only if needed.

it would be good to have this in my c#-apps, too


__________________________________________
a programmer is a tool that converts coffee into code...
aschi666, sthcomputing.de
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top