Andreas Zita
Andreas Zita

Reputation: 7570

.NET API for launching Internet Explorer with certain size and position?

I would like to create a windows desktop-looking app (Windows 7 and 8) out of my online html-app. I have tried embedding a browser-control in a WPF-window but then noticed it was an old version (IE7) of IE running inside WPF. I'm not sure if IE9 or IE10 will ever work embedded inside a WPF-app but I guess not. And I need the latest version of IE.

I've looked into the command line switches for IE but that didn't seem to do much with the visual presentation of the windows, except "kiosk mode". What I want is to at least set size and position, turn off all bars (except perhaps the address bar).

I've also looked into HTA-apps but I can't get it to open the external url in the same window. It keeps opening a new ordinary IE-window.

Any more options I haven't tried? Perhaps I can use some .NET API for this? I have searched but found very little information about any API for this (Only Process.Start which isn't enough)

Upvotes: 0

Views: 665

Answers (3)

Andreas Zita
Andreas Zita

Reputation: 7570

I've solved this myself now:

It turnes out the WebControl in WPF supports IE9 after all. It just depends on the content I'm loading in it. The source html has to be of the correct format for it to be loaded with IE9 (as opposed to IE7 which seem to be default).

Found it out here.

Upvotes: 0

Alex
Alex

Reputation: 23300

It sounds like you need to split things up: you're going to need to detach yourself from how your user interface works. You might need to re-engineer some parts of your application, but in the end you'll be way closer to your goal with two distinct UIs, in a branched structure like this (poor ASCII art schema below):

    (Application core)
          |  |
Web UI ---+  +--- WPF UI

Different UIs have different capabilities, and you may find that leveraging each one provides benefits.

Upvotes: 0

Diodeus - James MacFarlane
Diodeus - James MacFarlane

Reputation: 114417

What you may be looking for is called Kiosk Mode, which hides the browser UI and gives you a full-screen page only.

Upvotes: 1

Related Questions