locked
How to add url to webbrowser control RRS feed

  • Question

  • Hi all ...

    I have a help file in my project , And I want the WebBrowser control to preview it , I tried to

    use WebBrowser1.Url = "\program files\missed_calls\missed calls.exe"

    but it says it's  wrong.

    Many thanks in advance.

    Monday, March 29, 2010 11:07 PM

Answers

All replies

  • Hi,

    If you want to open the exe file from the browser, you have to add the html content to the webbrowser.

     <A href="file://\Windows\calc.exe">Calculator</A>

    For url,

    webForm.Url = new Uri(https://mail.google.com/mail/?shva=1);

    --> webForm is WebBrowser

     

    Regards,

    Malleswar

     

    Tuesday, March 30, 2010 4:25 AM
  • Many thanks Mallesawr for your reply ,

    Actually I created my help file as HTML file , And I deployed with my program , so I need when

    the user open the help Panel - Which contains WebBrowser control - to load this Help.html file

    into the webbrowser control.

    The way you mentioned works fine with ordinary URLs but not with files into device , Unless

    ofcourse there is a way I don't know.

    It will be appreciated if you can help me with that .

     

    Note : If you can tell me at least how I can make the system open the file by himself

    like Shell or Run ..... It will be better than nothing

    Many thanks in advance.

    Tuesday, March 30, 2010 4:34 AM
  • Hi Ashraf,

    You can try some thing like this:

    webForm.Url = new Uri("\\program files\1.html");

    But I suggest to follow this links to create help files:

    http://www.codeproject.com/KB/mobile/HelpFileIntegration.aspx

    http://www.christec.co.nz/blog/archives/74

    http://msdn.microsoft.com/en-us/library/ms229662.aspx

     

    Regards,

    Malleswar

     

    Tuesday, March 30, 2010 6:02 AM
  • Many thanks Malleswar for your great help , the first code is working fine , And the two other

    Ideas are really interesting and I'm testing them.

     

    Again ... Many thanks.

    Tuesday, March 30, 2010 6:44 AM