473,385 Members | 1,449 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,385 software developers and data experts.

Opening a browser from vb.net from

Hi ,
I am in need of opening a new IE browser with an URL from my windows
form, coded in vb.net.
I tried with the following code.
Dim psi As New ProcessStartInfo
psi.FileName = "iexplore"
psi.Arguments = "http://www.google.com"
Process.Start(psi)

it worked initially. But now I recieve the error
"The application failed to initialize properly (0xc000007b)."
It works for anyother appication like notepad, mspaint, winword etc...
but shows error for iexplore alone!

Please help me in achieving this...
Regards
Vignesh

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #1
8 2801
Vigneshwaran,

Default browser
\\\
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.FileName = "http://www.google.com"
p.StartInfo = pi
p.Start()
///
Nov 21 '05 #2
Hi Cor,
Thanks for ur response again.

I tried as u said, But still recieving the following error

An unhandled exception of type 'System.ComponentModel.Win32Exception'
occurred in system.dll

Additional information: The system cannot find the file specified

Any suggestions please?

Thanks,
Vignesh

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #3
Vignashwaran,

I tried it on a new form, it shows a browser with a Google page.

Therefore, why not try it in a new project.

cor
Nov 21 '05 #4
Thanks Cor,
It worked for me too in a new project!
But what I need is to add a button in a form of an existing application
cliking which a new browser should start with a given URL.

Any suggessions for this scenario please...

Regards
Vignesh

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #5
Vignesh,

This is standard, put a button on your form, click on that there will be a
buttonclick event created and in that you place this code.

I have the idea that I miss something from the problem

Cor
Nov 21 '05 #6
Hi Cor,
Thats where iam getting error.
If i write the same code in the button click event, iam getting the error
that i mentioned so far...

Thanks,
Vignesh

--
Message posted via http://www.dotnetmonster.com
Nov 21 '05 #7
Vignesh,

Like this,
\\\
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Dim p As New Process
Dim pi As New ProcessStartInfo
pi.FileName = "http://www.google.com"
p.StartInfo = pi
p.Start()
End Sub
///
This I cutted from a program that I tried, therefore you understand probably
already that it showed a browser.

I hope this helps,
Cor
Nov 21 '05 #8
"Vigneshwaran G via DotNetMonster.com" <fo***@DotNetMonster.com> schrieb:
I am in need of opening a new IE browser with an URL from my windows
form, coded in vb.net.
I tried with the following code.
Dim psi As New ProcessStartInfo
psi.FileName = "iexplore"
psi.Arguments = "http://www.google.com"
Process.Start(psi)

it worked initially. But now I recieve the error
"The application failed to initialize properly (0xc000007b)."
It works for anyother appication like notepad, mspaint, winword etc...
but shows error for iexplore alone!


Any reason for opening the file in IE explicitly? If there is no certain
reason for doing that, I'd let the OS pick the default browser to open the
document:

Opening files, applications, Web documents, and the mail client
<URL:http://dotnet.mvps.org/dotnet/faqs/?id=openfileappwebpage&lang=en>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>

Nov 21 '05 #9

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

Similar topics

1
by: Bob Murdoch | last post by:
I've got an intranet application that presents a list of files in sort of a 'central repository' web page. Each file is an href in the form <a href=file://server/share/path/filename.ext>. When...
3
by: Clinton Goff | last post by:
I am attempting to write a javascript app that will open a second browser window, load a url, such as www.google.com (foreign url) and perform a <File-Save As> function on that window. I am able...
44
by: Carlos Andr?s | last post by:
Hi everybody. I've got a problem. I'd like to avoid opening a new window when you have pressed the shift key and you click in the left button of the mouse. I've tried the next solution, in the...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
5
by: Brad | last post by:
In several aspx applications I export crytal reports to pdf, xls and doc files and then the aspx page writes the selected export file to the client browser. This all works with one small quirk: ...
6
by: Kenneth P | last post by:
Hi, It's rather common today, to see a PDF opening within a new Internet page. But how is it done in ASP.NET, VS2003? I'd rather use it as a way to invoice electronically. You email your...
1
by: Greg Smith | last post by:
Is there a way to control the opening size of the browser?
1
by: celoftis | last post by:
BACKGROUND: I have some PPT slides that have been converted to HTM (ensuring that the show slide animations while browsing checkbox is checked). The original HTM slides have custom animations to...
11
by: emailus | last post by:
I am webmaster for the domain <www.alpha1.org.au>. Not being an expert in html, I take advantage of my domain Registrant's web building tool, 'Instant Website'. This tool is provided as part of...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...

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.