473,224 Members | 1,575 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,224 software developers and data experts.

Browser Control

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

Jul 21 '05 #1
8 1536
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."

Jul 21 '05 #2
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."

Jul 21 '05 #3
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."

Jul 21 '05 #4
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."

Jul 21 '05 #5
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."

Jul 21 '05 #6
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."

Jul 21 '05 #7
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."

Jul 21 '05 #8
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."

Jul 21 '05 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: dxben | last post by:
I am considering a situation where I have (n) number of form windows, each with an instance of the Microsoft Web Browser Control (IE) on each form. In each web browser control is an HTML page that...
1
by: Mark Johnson | last post by:
I wonder if anyone has a solution? I wanted to use the web browser control as a 'zoom' box for a smaller textbox. I can format in the control, and save whatever formatting as HTML code back to the...
0
by: Mark Johnson | last post by:
The last reply got sort of cutoff. So here again: So for anyone interested, here's the simple regexp patterns for the substitutions required. The textbox control is being 'zoomed' in a popup...
1
by: Praveena | last post by:
Hi All, I am developing a Web Page in ASP.NET where i am using a Web Browser control. I created this selecting the "Microsoft Web Browser" in the custom controls. Now the problem is with the...
28
by: BobAchgill | last post by:
Has anyone had success with using this Com control? When I add it into my tool box and drop it into my form it says in the properties that the Document and LocationURL are read only. (they are...
12
by: VJ | last post by:
I am using the web browser control.., I would like to add the control at runtime... I was adding the web browser control at desgin time. Now I decided to add the control at run time so I removed...
1
by: Oenone | last post by:
I've reached the conversion of a part of my application from VB6 to VB.NET which uses the COM Web Browser control to display HTML content generated by my application. The general approach used...
0
by: Pieter | last post by:
Hi, I've a activex browser control in a form. I've added proxy server support to the control by modifying the proxy server settings in the registry. This works fine before the browser control is...
1
by: john conwell | last post by:
I'm using the Browser control to display html that my application generates. Some times i want a javascript to run when the html gets displayed in the browser control, and sometimes i dont. Is...
5
by: jeremy | last post by:
I have an ASP.Net 2.0 application running on Windows Server 2003. The application displays properly in Internet Explorer, however, when I use a browser control embedded in a .net form, I get an...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.