Click here to Skip to main content
15,790,267 members
Home / Discussions / C#
   

C#

 
GeneralAdd a Computer Domain Pin
Chathura5-Nov-03 10:41
Chathura5-Nov-03 10:41 
GeneralRe: Add a Computer Domain Pin
miahrugger5-Nov-03 16:57
miahrugger5-Nov-03 16:57 
GeneralRe: Add a Computer Domain Pin
Chathura10-Nov-03 12:59
Chathura10-Nov-03 12:59 
GeneralBeginner localization question Pin
Anonymous5-Nov-03 7:02
Anonymous5-Nov-03 7:02 
GeneralRe: Beginner localization question Pin
Heath Stewart5-Nov-03 9:11
protectorHeath Stewart5-Nov-03 9:11 
GeneralBeginner's localization question Pin
Anonymous5-Nov-03 7:01
Anonymous5-Nov-03 7:01 
QuestionUsing Explorer control to display HTML code? Pin
trungbkvn5-Nov-03 6:54
trungbkvn5-Nov-03 6:54 
AnswerRe: Using Explorer control to display HTML code? Pin
Stephane Rodriguez.5-Nov-03 11:00
Stephane Rodriguez.5-Nov-03 11:00 
1) Create a new C# Windows application
2) Go in the Toolbox, right-click, add a new item. Choose the "COM components" tab, and select the "Microsoft web browser" (shdocvw.dll)
3) drop the web browser onto the form
4) select the web browser control
5) show the Properties window, click on the laser icon to show all events
6) in front of NavigateComplete, add an event handler, for instance : OnNavigateComplete.
7) go back in the solution tree, right-click and add a reference, browse then choose "Microsoft HTML document" (mshtml.dll)
8) open the C# code
9) add the #using mshtml; statement at the top
10) in InitializeComponent(), add the following code :

// fake IE startup
object o = null;
Show();
axWebBrowser1.Navigate("about:blank", ref o, ref o, ref o, ref o);


Then, implement your event handler like this :

private void OnNavigateComplete(object sender, AxSHDocVw.DWebBrowserEvents2_NavigateComplete2Event e)
{
  IHTMLDocument2 doc = (IHTMLDocument2) this.axWebBrowser1.Document;
  doc.body.innerHTML = @"<img src='http://www.arstdesign.com/iconpdf.gif' border=0>";
}


As you can see, the event handler is only here to temporize before the Internet Explorer instance is up and ready. Once it is, we add the html code to render with a simple doc.body.innerHTML statement.

Good luck!




  RSS feed
GeneralRe: Using Explorer control to display HTML code? Pin
trungbkvn8-Nov-03 0:32
trungbkvn8-Nov-03 0:32 
QuestionHow to register a new type of file to Windows? Pin
kokain5-Nov-03 6:45
kokain5-Nov-03 6:45 
AnswerRe: How to register a new type of file to Windows? Pin
Heath Stewart5-Nov-03 9:14
protectorHeath Stewart5-Nov-03 9:14 
GeneralRe: How to register a new type of file to Windows? Pin
kokain5-Nov-03 16:12
kokain5-Nov-03 16:12 
QuestionAny good Active Directory programming books? Pin
Jim Schram5-Nov-03 4:04
Jim Schram5-Nov-03 4:04 
GeneralNetwork Enumeration Pin
totig5-Nov-03 3:59
totig5-Nov-03 3:59 
GeneralRe: Network Enumeration Pin
Heath Stewart5-Nov-03 5:14
protectorHeath Stewart5-Nov-03 5:14 
GeneralRe: Network Enumeration Pin
Jeff Varszegi5-Nov-03 5:24
professionalJeff Varszegi5-Nov-03 5:24 
QuestionInbox in Csharp? Pin
sashy5-Nov-03 3:46
sashy5-Nov-03 3:46 
AnswerRe: Inbox in Csharp? Pin
totig5-Nov-03 4:00
totig5-Nov-03 4:00 
GeneralRe: Inbox in Csharp? Pin
sashy5-Nov-03 5:10
sashy5-Nov-03 5:10 
GeneralRe: Inbox in Csharp? Pin
Heath Stewart5-Nov-03 5:20
protectorHeath Stewart5-Nov-03 5:20 
QuestionHow to convert DateTime in C# into DateTime in MSAccess Pin
zecodela5-Nov-03 3:13
zecodela5-Nov-03 3:13 
AnswerRe: How to convert DateTime in C# into DateTime in MSAccess Pin
Jeff Varszegi5-Nov-03 4:48
professionalJeff Varszegi5-Nov-03 4:48 
GeneralRe: How to convert DateTime in C# into DateTime in MSAccess Pin
zecodela5-Nov-03 14:30
zecodela5-Nov-03 14:30 
GeneralRe: How to convert DateTime in C# into DateTime in MSAccess Pin
Giles6-Nov-03 2:01
Giles6-Nov-03 2:01 
GeneralSQL server connection string issue :-( Pin
Nish Nishant5-Nov-03 2:16
sitebuilderNish Nishant5-Nov-03 2:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.