|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Opening a browser from vb.net fromI 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 Vigneshwaran,
Default browser \\\ Dim p As New Process Dim pi As New ProcessStartInfo pi.FileName = "http://www.google.com" p.StartInfo = pi p.Start() /// 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 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 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 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 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 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 "Vigneshwaran G via DotNetMonster.com" <fo***@DotNetMonster.com> schrieb: Any reason for opening the file in IE explicitly? If there is no certain > 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! 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/>
datagrid filled from a list
Help using Right() string function? Parameter it doesn't work (for me) II Parameters it doesnt work (for me) Sequential file access and binary file access socket class How to set the default value of a date picker to nothing (blank) Datagrid Question Parameter it doesn't work (for me) IIII Sending large amounts of UDP data |
|||||||||||||||||||||||