ActiveXInstance is null after InitializeComponent();

  • Thread starter Thread starter Sin Jeong-hun
  • Start date Start date
S

Sin Jeong-hun

WebBrowser control has ActiveXInstance property. I tried to access
this property right after InitializeComponent();, but it was null. It
looks like I have to wait for a sec to have this property initialized.
The problem is that I cannot know when. I tried to find an event
something like "WebBrowser.Initialized" but there wasn't. Is there any
way to get notified when the ActiveXInstance is set?
Thank you.
 
WebBrowser control has ActiveXInstance property. I tried to access
this property right after InitializeComponent();, but it was null. It
looks like I have to wait for a sec to have this property initialized.
The problem is that I cannot know when. I tried to find an event
something like "WebBrowser.Initialized" but there wasn't. Is there any
way to get notified when the ActiveXInstance is set?
Thank you.

Well, I sort of worked around thsi problem. I called
WebBrowser.GoBack() first before accessing WebBrowser.ActiveXInstance.
Looks Like the GoBack() method initializes the ActiveXInstance without
causing any collateral effects.

But, still looking for a more reasonable, logical solution.
 
Back
Top