Hi,i want to create a program in C# that when i type an address of web page in browser(IE) fisrt of all shows me a message when i confirm it then my browser shows it. my op is seven.
can anyone helps me?
thanks in advane.
Loading
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Mayur GujrathiRank #666 · 3.6K reputationPosted Dec 15, 2011, 10:17 PM EST
abc sharp69 reputationPosted Dec 15, 2011, 10:30 PM EST
thank you.
Sam HobbsRank #107 · 20.5K reputationPosted Dec 16, 2011, 11:35 AM EST
I know that what you need to do is very clear to you, but there are many ways to interpret what you are saying. Note that a WebBrowser control does not have an adddress bar for typing in an address so it is not clear what you mean by "type an address of web page in browser".
abc sharp69 reputationPosted Dec 16, 2011, 9:40 PM EST
I saw also:
http://msdn.microsoft.com/en-us/library/system.net.sockets.tcplistener.aspx
and
http://stackoverflow.com/questions/226784/how-to-create-a-simple-proxy-in-c
but they aren't complete for me.
what's your suggestion?
Manoj Singh PanwarRank #529 · 4.6K reputationPosted Dec 17, 2011, 12:44 AM EST
If you really want to code this up, do mention the language you are coding and try to elaborate your question so that it could be answered well.
abc sharp69 reputationPosted Dec 17, 2011, 7:22 AM EST
Sam HobbsRank #107 · 20.5K reputationPosted Dec 17, 2011, 9:29 AM EST
A simpler solution would be to write a program that opens a IE window using the InternetExplorer class. You would then have the instance of the IE window and you could then handle its events. The following is a console window that shows doing that but you can do it in a form. To use the code, you must add a reference for shdocvw.dll.
static void ie_BeforeNavigate(string URL, int Flags, string TargetFrameName, ref object PostData, string Headers, ref bool Cancel)abc sharp69 reputationPosted Dec 17, 2011, 6:58 PM EST
Sam HobbsRank #107 · 20.5K reputationPosted Dec 17, 2011, 7:45 PM EST
abc sharp69 reputationPosted Dec 17, 2011, 9:10 PM EST
Sam HobbsRank #107 · 20.5K reputationPosted Dec 17, 2011, 9:46 PM EST
abc sharp69 reputationPosted Dec 17, 2011, 10:07 PM EST
abc sharp69 reputationPosted Dec 18, 2011, 4:35 PM EST
select property from right click of SHDocVm dll then you must change Embed interop types into false.
it shows me all of web address that i see.
but it has two problem when you open a new tab it dosn't work well, and if exist a internert explorer browser befor it doesn't work you know it opens seperatly.
Could you tell me how can i refuse an address when it want to show in browser? for example now i can see URL in browser i want my proram shows me a message box before the wesite be loaded in the browser and when i confirm messagebox browser(internet explorer) does show the web site.
Sam HobbsRank #107 · 20.5K reputationPosted Dec 18, 2011, 6:31 PM EST