| | |
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 7 access algorithm app application array barchart bitmap box broadcast c# cast check checkbox client color combo combobox concurrency control conversion csharp custom data database datagrid datagridview dataset datatable datetime degrees development draganddrop drawing enabled encryption enum event excel file form format forms function gdi+ getoutlookcontactusinfcsvfile globalization httpwebrequest image index input install java label list listbox localization mandelbrot math microsoftc#visualexpress mono mouseclick mysql operator path photoshop picturebox pixelinversion post programming radians regex remote remoting richtextbox server sleep socket sql sql-server statistics stream string table text textbox thread time timer update usercontrol validate validation visualstudio webbrowser windows winforms wpf xml






