Click here to Skip to main content
15,880,725 members
Home / Discussions / C#
   

C#

 
GeneralRe: Replacement for SetRedraw Pin
leppie15-Oct-02 7:41
leppie15-Oct-02 7:41 
GeneralRe: Replacement for SetRedraw Pin
Zombies with Coffee, LLC15-Oct-02 8:25
professionalZombies with Coffee, LLC15-Oct-02 8:25 
GeneralRe: Replacement for SetRedraw Pin
leppie15-Oct-02 9:44
leppie15-Oct-02 9:44 
GeneralHBITMAP problem (interop)... Pin
Anonymous15-Oct-02 5:08
Anonymous15-Oct-02 5:08 
Generalras idle timeout Pin
David Le Bas15-Oct-02 3:09
sussDavid Le Bas15-Oct-02 3:09 
QuestionRichTextBox > HTML? MailFormat.RTF? Pin
rendle15-Oct-02 2:53
rendle15-Oct-02 2:53 
AnswerRe: RichTextBox > HTML? MailFormat.RTF? Pin
Stephane Rodriguez.15-Oct-02 2:59
Stephane Rodriguez.15-Oct-02 2:59 
GeneralProblem with frames using .NET & webbrowser control Pin
GriffonRL14-Oct-02 23:14
GriffonRL14-Oct-02 23:14 
Hello,

I am currently porting a webbrowser application from C++
to C#/.NET.
I already struggled with the beforenavigate2 bug everybody
was talking about and I can't wait for the .NET SP3.
My current problem is when trying to traverse the DOM tree
after a documentcomplete event. It works properly for non
framed document but not for framed pages.
Everytime a documentcomplete event is fired I always get
the same document (the top level one). It should mean that
I am always getting the same document, but I must be
missing something because I don't know how to get a
specific frame document.


Here is the C# piece of code:

<br />
private void documentComplete(object sender, <br />
AxSHDocVw.DWebBrowserEvents2_DocumentCompleteEvent e){<br />
<br />
AxSHDocVw.AxWebBrowser Frame;<br />
IHTMLDocument3 Doc;<br />
IHTMLDOMChildrenCollection Tags;<br />
IHTMLElement Tag;<br />
int NumTags;<br />
<br />
Console.WriteLine("URL: "+e.uRL); // Good frame URL<br />
try{<br />
 Frame=(AxSHDocVw.AxWebBrowser)sender; // Is it really the <br />
frame ?<br />
 if(Frame!=null){<br />
  Doc=(IHTMLDocument3)Frame.Document; // Top level <br />
document ???<br />
  if(Doc!=null){<br />
   Tags=(IHTMLDOMChildrenCollection)Doc.childNodes;<br />
    if(Tags!=null){			<br />
     NumTags=Tags.length;<br />
     for(int i=0;i<NumTags;i++){		<br />
      Tag=(IHTMLElement)Tags.item(i);<br />
      if(Tag!=null) traverseDOM(Tag);<br />
      }<br />
     }<br />
    }<br />
   }<br />
  }<br />
catch(Exception ex){<br />
 Console.WriteLine("Error: "+ex.ToString());<br />
 }<br />
}<br />


Another question is: what is e.pDisp ? How to cast it ? It
tried to cast it into an AxSHDocVw.AxWebBrowser and I got
an error.

Regards,

R. L.
GeneralRe: Problem with frames using .NET & webbrowser control Pin
Stephane Rodriguez.15-Oct-02 0:36
Stephane Rodriguez.15-Oct-02 0:36 
GeneralRe: Problem with frames using .NET & webbrowser control Pin
GriffonRL15-Oct-02 1:01
GriffonRL15-Oct-02 1:01 
GeneralRe: Problem with frames using .NET & webbrowser control Pin
Stephane Rodriguez.15-Oct-02 2:58
Stephane Rodriguez.15-Oct-02 2:58 
GeneralRe: Problem with frames using .NET & webbrowser control Pin
GriffonRL15-Oct-02 4:35
GriffonRL15-Oct-02 4:35 
GeneralRe: Problem with frames using .NET & webbrowser control Pin
Stephane Rodriguez.15-Oct-02 4:56
Stephane Rodriguez.15-Oct-02 4:56 
GeneralRe: Problem with frames using .NET & webbrowser control Pin
Andrew Connell15-Oct-02 5:57
Andrew Connell15-Oct-02 5:57 
GeneralRe: Problem with frames using .NET & webbrowser control Pin
GriffonRL15-Oct-02 9:36
GriffonRL15-Oct-02 9:36 
GeneralRe: Problem with frames using .NET & webbrowser control Pin
Stephane Rodriguez.15-Oct-02 10:06
Stephane Rodriguez.15-Oct-02 10:06 
GeneralIPC Pin
CSharpDavid14-Oct-02 12:22
CSharpDavid14-Oct-02 12:22 
GeneralRe: IPC Pin
Stephane Rodriguez.15-Oct-02 0:45
Stephane Rodriguez.15-Oct-02 0:45 
GeneralSelf describing functions Pin
IanC14-Oct-02 11:38
IanC14-Oct-02 11:38 
GeneralRe: Self describing functions Pin
Marc Clifton14-Oct-02 12:11
mvaMarc Clifton14-Oct-02 12:11 
GeneralRe: Self describing functions Pin
Anonymous14-Oct-02 22:23
Anonymous14-Oct-02 22:23 
GeneralRe: Self describing functions Pin
Marc Clifton15-Oct-02 1:27
mvaMarc Clifton15-Oct-02 1:27 
QuestionGetting Current Date? Pin
afronaut14-Oct-02 9:28
afronaut14-Oct-02 9:28 
AnswerRe: Getting Current Date? Pin
Stephane Rodriguez.14-Oct-02 9:42
Stephane Rodriguez.14-Oct-02 9:42 
GeneralRe: Getting Current Date? Pin
afronaut14-Oct-02 9:58
afronaut14-Oct-02 9:58 

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.