PC Review


Reply
Thread Tools Rating: Thread Rating: 4 votes, 5.00 average.

Browser Control

 
 
=?Utf-8?B?RGF2aWQ=?=
Guest
Posts: n/a
 
      24th Feb 2005
Hi

I'm developing an internet app. in which I want to prevent the user from
being able to browse the web whikst they are in the app. So I want to hide
the I.E. address bar and prevent any new instances of I.E. other than the one
running the app.
I.E. 5 or later are specified as the only programs for running hte app, so I
donlt have to be concerned about other, or earlier, browsers.

Any pointer would be appreciated. I can't modify the registry as the
machines are locked down, which excludes a lot of things I've seen on the web.

Thanks

David

 
Reply With Quote
 
 
 
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      25th Feb 2005
Hi David,

First of all, I would like to confirm my understanding of your issue. From
your description, I understand that you need to open an IE window with no
address bar. If there is any misunderstanding, please feel free to let me
know.

As far as I know, this can only be achieved by using some client side
script. When opening a new window using window.open, we can specify this in
the feature arguments. Here is an example,

function NewWindow()
{
window.open("http://www.microsoft.com", null,
"height=200,width=400,status=no,toolbar=no,menubar=no,location=no")
}

For more information on window.open, please check the following link:

http://msdn.microsoft.com/library/de...thor/dhtml/ref
erence/methods/open_0.asp

If you're working on a Windows form app that cannot use javascripts, you
can try to add an IE web browser control.

HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQ=?=
Guest
Posts: n/a
 
      25th Feb 2005
Hi Kevin

I didn't explain fully. The app is a standard .NET app written in c#.
When user goes to Url for the app, I want to close close the address bar. It
can stay closed until next time they start I.E. If necessry I will close it
on every page of my app but hopefully this won't be necessary.

Essentially we want to stop the user having access to the internet whist
running this internet app! They will be in a classroom situation and we don't
want them looking for answers! There is an invigilator keeping an eye on the
users, however...

Even more important is to stop the user running a second browser because
then, of course, they can quickly switch between the two copies, getting
answers from one and entering them into another - and if the invigilator
comes close its so easy to flick away from the second browser. If they get
caught with more than 1 browser they wil be disqualified, but that won't stop
some trying, Im sure.

Any pointer for this woudl be appreciated.

David
"Kevin Yu [MSFT]" wrote:

> Hi David,
>
> First of all, I would like to confirm my understanding of your issue. From
> your description, I understand that you need to open an IE window with no
> address bar. If there is any misunderstanding, please feel free to let me
> know.
>
> As far as I know, this can only be achieved by using some client side
> script. When opening a new window using window.open, we can specify this in
> the feature arguments. Here is an example,
>
> function NewWindow()
> {
> window.open("http://www.microsoft.com", null,
> "height=200,width=400,status=no,toolbar=no,menubar=no,location=no")
> }
>
> For more information on window.open, please check the following link:
>
> http://msdn.microsoft.com/library/de...thor/dhtml/ref
> erence/methods/open_0.asp
>
> If you're working on a Windows form app that cannot use javascripts, you
> can try to add an IE web browser control.
>
> HTH.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
>

 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      26th Feb 2005
Hi David,

It hard to start an IE process from your windows form app with the address
bar hidden. So I recommend you try to use the Microsoft Web Browser control
in your app to browse a page. Here are the steps:

1. Right click in the toolbox and select Add/Remove Items...
2. On the COM Components tab, check Microsoft Web Browser and click OK.
3. Add a control to your form.

You can use the Navigate method to open the URL. HTH.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQ=?=
Guest
Posts: n/a
 
      28th Feb 2005
Hi Kevin

This is an internet app. It is running in Internet Explorer right from the
start.

David

"Kevin Yu [MSFT]" wrote:

> Hi David,
>
> It hard to start an IE process from your windows form app with the address
> bar hidden. So I recommend you try to use the Microsoft Web Browser control
> in your app to browse a page. Here are the steps:
>
> 1. Right click in the toolbox and select Add/Remove Items...
> 2. On the COM Components tab, check Microsoft Web Browser and click OK.
> 3. Add a control to your form.
>
> You can use the Navigate method to open the URL. HTH.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
>

 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      1st Mar 2005
Hi David,

Since it is running from a web app, I think the following script will meet
you needs. First, it opens a new IE window with no address bar. Then the
parent window closes itself. HTH.

function OpenNewWindow()
{
window.open("http://www.microsoft.com", null,
"height=200,width=400,status=no,toolbar=no,menubar=no,location=no");
window.opener=window.self;
window.close();
}

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQ=?=
Guest
Posts: n/a
 
      3rd Mar 2005
Hi Kevin

I've experimented with tis and I think I can get it to do the job.
Thank you very much for your help.

Any thoughts about preventing another instance of I.E. or of detecting one
and shutting it down?
Probably goes against all the security checks to be able to do this,
especially if XP SP2 in use! But ...

David

"Kevin Yu [MSFT]" wrote:

> Hi David,
>
> Since it is running from a web app, I think the following script will meet
> you needs. First, it opens a new IE window with no address bar. Then the
> parent window closes itself. HTH.
>
> function OpenNewWindow()
> {
> window.open("http://www.microsoft.com", null,
> "height=200,width=400,status=no,toolbar=no,menubar=no,location=no");
> window.opener=window.self;
> window.close();
> }
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
>

 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      4th Mar 2005
You're welcome, David. However, I think it's quite hard to restrict only
one IE instance running on certain machine.

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community.

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
=?Utf-8?B?RGF2aWQ=?=
Guest
Posts: n/a
 
      4th Mar 2005
Hi Kevin

Thanks for the reply. What I am now thinking about is providing a WSH script
that can be run to change the setiup before the applicaiton is run, then a
secopnd script to run afterwards to restore the set-up. The script can them,
perhaps, set I.E. to allow input from only one web site. Then it does not
matter how many instances there are. Unfortunately I have never written a wsh
script! I'll start looking for resources to see if this approach is viable.

Thanks again,
David


"Kevin Yu [MSFT]" wrote:

> You're welcome, David. However, I think it's quite hard to restrict only
> one IE instance running on certain machine.
>
> Thanks for sharing your experience with all the people here. If you have
> any questions, please feel free to post them in the community.
>
> Kevin Yu
> =======
> "This posting is provided "AS IS" with no warranties, and confers no
> rights."
>
>

 
Reply With Quote
 
Kevin Yu [MSFT]
Guest
Posts: n/a
 
      5th Mar 2005
Hi David,

Thanks for sharing your experience with all the people here. If you have
any questions, please feel free to post them in the community. The
following is a proper newsgroup for wsh questions.

microsoft.public.scripting.wsh

Kevin Yu
=======
"This posting is provided "AS IS" with no warranties, and confers no
rights."

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Control scroll Bar of Microsoft Web browser control Siju V Eugin Microsoft VB .NET 0 14th Dec 2005 12:53 PM
Control default color of web browser control.... =?Utf-8?B?aHpndDliQG5vcG9zdC5jb20=?= Microsoft Powerpoint 2 20th Sep 2005 08:48 PM
Suppress ActiveX Control Warning in web browser control =?Utf-8?B?QW5kcmV3IENvcGU=?= Microsoft Dot NET Framework Forms 0 13th Jul 2004 12:00 PM
WebBrowser control : need help controlling browser control from within VC++ .NET 2003 program max reason Microsoft VC .NET 0 24th Feb 2004 05:02 AM
Control-N MainMenu shortcut weirdness with ActiveX Browser control Tom W Microsoft C# .NET 0 20th Jan 2004 05:15 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:14 PM.