| | |
Activate WebBrowser
Please support our C# advertiser: Intel Parallel Studio Home
![]() |
C# Syntax (Toggle Plain Text)
webBrowser1.Url = new Uri("http://microsoft.com");
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Zip your project and upload it. You can do this by clicking "Go Advanced" next to "Post Quick Reply", and in the next screen click on manage attachments.
It works I tried it 
Please tell me what's the compilation error...

Please tell me what's the compilation error...
Last edited by Ramy Mahrous; Sep 18th, 2009 at 10:10 am.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
Yes, you can but it inside button click event handler or set it from control properties
Uri = http://microsoft.com
Believe me it works
Uri = http://microsoft.com
Believe me it works
Last edited by Ramy Mahrous; Sep 18th, 2009 at 11:13 am.
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
In the project you uploaded the only thing I see for the browser is:
That is in the document complete event but I don't see anywhere that initially tell the navigator to browse. You should not be changing the browser's URL in the complete event because when it finishes loading a page it will call that event, triggering another page load, and it will loop.
I made these changes and it works:
C# Syntax (Toggle Plain Text)
void WebBrowser1DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { webBrowser1.Url = new Uri("http://microsoft.com"); }
That is in the document complete event but I don't see anywhere that initially tell the navigator to browse. You should not be changing the browser's URL in the complete event because when it finishes loading a page it will call that event, triggering another page load, and it will loop.
I made these changes and it works:
C# Syntax (Toggle Plain Text)
void BrowseFaultyAPClk(object sender, EventArgs e) { webBrowser1.Navigate(@"http://www.google.com"); /* string FaultyAPAddr = "http://" + FaultyAPIPOct1Num.Value + "." + FaultyAPIPOct2Num.Value + "." + FaultyAPIPOct3Num.Value + "." + FaultyAPIPOct4Num.Value + "."; Process ProcessIeFaultyAP = new System.Diagnostics.Process(); ProcessIeFaultyAP.StartInfo.FileName = "iexplore.exe"; ProcessIeFaultyAP.StartInfo.WorkingDirectory = @"C:\WINDOWS\ie7"; ProcessIeFaultyAP.StartInfo.Arguments = String.Format(FaultyAPAddr); ProcessIeFaultyAP.Start(); */ } void WebBrowser1DocumentCompleted(object sender, WebBrowserDocumentCompletedEventArgs e) { //webBrowser1.Url = new Uri("http://microsoft.com"); }
![]() |
Similar Threads
- how to activate SEO ? (Search Engine Optimization)
- How to activate "Ctrl - Alt - Del" at logon? (Windows NT / 2000 / XP)
- Cant activate windows (Windows NT / 2000 / XP)
- norton doesn't activate after trojan.tooso.j (Viruses, Spyware and other Nasties)
- Cant Activate Windows... (Windows NT / 2000 / XP)
- Activate NetMeeting (Windows tips 'n' tweaks)
- About:Blank Homepage (Viruses, Spyware and other Nasties)
- Computer seems to stall or slow down (Viruses, Spyware and other Nasties)
Other Threads in the C# Forum
- Previous Thread: Including DLLs for use in other programs
- Next Thread: Remove duplicates from a List<Rectangle> C#
| Thread Tools | Search this Thread |
.net access ado.net algorithm array barchart bitmap box broadcast buttons c# check checkbox client combobox connection console control conversion csharp custom database datagrid datagridview dataset datetime degrees deployment developer development draganddrop drawing editing encryption enum event excel file form format forms function gdi+ hospitalmanagementinformationsystem httpwebrequest image imageprocessing index input install java label list listbox mandelbrot math mouseclick mysql operator oracle path photoshop picturebox pixelinversion post priviallages. programming radians regex remote remoting richtextbox rows serialization server sleep socket sql statistics stream string table temperature text textbox thread time timer txt update uploadatextfile usercontrol validation visualstudio webbrowser windows windowsformsapplication winforms wpf xml






