473,394 Members | 1,702 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,394 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 1547
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.