Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

hi, how can i brows a html file to my win application? (c#.net)

1. i have a javascript file (js) and i want run it in my win app. (as a html file run it)

or

2. i have a html page in same directory of my exe app and i want brows it in my form.

or

3. is there any class that set to a html source string and run it?

 

thanks

[ once4ever ]
  • Leaders
Posted
Which version of C# are you using? C# 2.0 has a web browser control which can host html files, and while there is no way to simply run javascript code by itself (that I know of), as long as it is part of a web page displayed in a web browser control it will be run just as you would expect when browsing the page in IE.
[sIGPIC]e[/sIGPIC]
Posted
Which version of C# are you using?
i use c# 1 (vs2003).

can i brows a html file that there is some javascript in it and it run in my form as IE? (in version C#2)

thank you

[ once4ever ]
  • Leaders
Posted
There is also an ActiveX web browser control you can use. I can't remember the details, but a google search should bring up plenty of info. And if you host an html file in a web browser control, it will behave exactly as it would in Internet Explorer (it is, in fact, an Internet Explorer browser minus the menu, title bar, status bar, et cetera).
[sIGPIC]e[/sIGPIC]
Posted

i used activex before and it was very hard with external dll :-<

thanks anyway

maybe i could use c#2.0 and it have html browser that add to my forms as simple as textbox. is it?

[ once4ever ]
  • Leaders
Posted
All you have to do is add a reference to the appropriate .dll and drop it in like a WinForms control. (On my computer the DLL was located at C:\Windows\System32\shdocvw.dll, the control is named WebBrowser). If this is the control you are using, what is the problem?
[sIGPIC]e[/sIGPIC]

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...