Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 966281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T02:07:59+00:00 2026-05-16T02:07:59+00:00

I have a winforms c# app that has an embedded webbrowser control inside it

  • 0

I have a winforms c# app that has an embedded webbrowser control inside it generated through VS.NET 2008. We sink events by inheriting our events class from HTMLDocumentEvents2.

 public class IEHTMLDocumentEvents : mshtml.HTMLDocumentEvents2
 {
     public bool onclick(mshtml.IHTMLEventObj pEvtObj)
     {
         // Clicking on an input (checkbox, radio, button, image)
         if (pEvtObj.srcElement.tagName == "INPUT")
         {
             // The following will result in a null pointer without VS.NET installed
             HTMLInputElementClass input = pEvtObj.srcElement as HTMLInputElementClass;
         }
     }
 }

The code above works fine when clicking on elements in the webbrowser control on our dev machines with VS.NET installed.
However it fails to cast the pEvtObj.srcElement when VS.NET is not installed. This immediately starts working when we install the most basic VS.NET with C# that you can.

To note: The rest of the c# app works fine, and you can browser the web through the control fine as well, just that the events like the above ‘onclick’ can’t be handled properly.

I thought it would be a DLL version loaded issue but doing a diff of the files loaded indicates only minor differences.

1c1
< Process: C# App without VS.NET installed
---
> Process: C# App with VS.NET 2008 installed
18d17
< C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\CustomMarshalers\e148983beeb0f30918b0564849a16456\CustomMarshalers.ni.dll CustomMarshalers.ni.dll Microsoft .NET Framework Custom Marshalers Microsoft Corporation 2.0.50727.3053
36d34
< C:\Documents and Settings\XpHome\Local Settings\History\History.IE5\index.dat index.dat   
37a36
> C:\Documents and Settings\XpHome\Local Settings\History\History.IE5\index.dat index.dat   
44,45c43,44
< C:\Program Files\<hidden>\<hidden>\Microsoft.mshtml.dll Microsoft.mshtml.dll     7.0.3300.1
< C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\Microsoft.VisualBas#\5b3d048d8c003d743ea5e72caf07773a\Microsoft.VisualBasic.ni.dll Microsoft.VisualBasic.ni.dll Visual Basic Runtime Library Microsoft Corporation 8.0.50727.3053
---
> C:\WINDOWS\assembly\GAC\Microsoft.mshtml\7.0.3300.0__b03f5f7f11d50a3a\Microsoft.mshtml.dll Microsoft.mshtml.dll     7.0.3300.1
> C:\WINDOWS\assembly\GAC_MSIL\Microsoft.VisualBasic\8.0.0.0__b03f5f7f11d50a3a\Microsoft.VisualBasic.dll Microsoft.VisualBasic.dll Visual Basic Runtime Library Microsoft Corporation 8.0.50727.3053
50,52c49,51
< c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll mscorjit.dll Microsoft .NET Runtime Just-In-Time Compiler Microsoft Corporation 2.0.50727.3053
< C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\9adb89fa22fd5b4ce433b5aca7fb1b07\mscorlib.ni.dll mscorlib.ni.dll Microsoft Common Language Runtime Class Library Microsoft Corporation 2.0.50727.3053
< c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll mscorwks.dll Microsoft .NET Runtime Common Language Runtime - WorkStation Microsoft Corporation 2.0.50727.3053
---
> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorjit.dll mscorjit.dll Microsoft .NET Runtime Just-In-Time Compiler Microsoft Corporation 2.0.50727.3082
> C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\mscorlib\7124a40b9998f7b63c86bd1a2125ce26\mscorlib.ni.dll mscorlib.ni.dll Microsoft Common Language Runtime Class Library Microsoft Corporation 2.0.50727.3603
> c:\WINDOWS\Microsoft.NET\Framework\v2.0.50727\mscorwks.dll mscorwks.dll Microsoft .NET Runtime Common Language Runtime - WorkStation Microsoft Corporation 2.0.50727.3603
94,98c93,97
< C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Configuration\cb4cb21d14767292e079366a5d3d76cd\System.Configuration.ni.dll System.Configuration.ni.dll System.Configuration.dll Microsoft Corporation 2.0.50727.3053
< C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Drawing\6978f2e90f13bc720d57fa6895c911e2\System.Drawing.ni.dll System.Drawing.ni.dll .NET Framework Microsoft Corporation 2.0.50727.3053
< C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\aa7926460a336408c8041330ad90929d\System.ni.dll System.ni.dll .NET Framework Microsoft Corporation 2.0.50727.3053
< C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Windows.Forms\9a254c455892c02355ab0ab0f0727c5b\System.Windows.Forms.ni.dll System.Windows.Forms.ni.dll .NET Framework Microsoft Corporation 2.0.50727.3053
< C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\36f3953f24d4f0b767bf172331ad6f3e\System.Xml.ni.dll System.Xml.ni.dll .NET Framework Microsoft Corporation 2.0.50727.3053
---
> C:\WINDOWS\assembly\GAC_MSIL\System.Configuration\2.0.0.0__b03f5f7f11d50a3a\System.Configuration.dll System.Configuration.dll System.Configuration.dll Microsoft Corporation 2.0.50727.3053
> C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Drawing\abb2ac7e08bee026f857d8fa36f9fe6f\System.Drawing.ni.dll System.Drawing.ni.dll .NET Framework Microsoft Corporation 2.0.50727.3053
> C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System\3de5bd01124463d7862bd173af90bc83\System.ni.dll System.ni.dll .NET Framework Microsoft Corporation 2.0.50727.3053
> C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Windows.Forms\d2ea8d76f015817db1607075812b555f\System.Windows.Forms.ni.dll System.Windows.Forms.ni.dll .NET Framework Microsoft Corporation 2.0.50727.3053
> C:\WINDOWS\assembly\NativeImages_v2.0.50727_32\System.Xml\5913d3f81e77194ec833991b1047a532\System.Xml.ni.dll System.Xml.ni.dll .NET Framework Microsoft Corporation 2.0.50727.3082
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T02:08:00+00:00Added an answer on May 16, 2026 at 2:08 am

    Ok, found the answer finally. It appears that even though it successfully loads the microsoft.mshtml.dll that we distribute with the app. The COM interfaces cannot be accessed unless you register it in the GAC on the client machine using regasm.exe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 488k
  • Answers 488k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer If the clipboard contains text whose lines are URLs, you… May 16, 2026 at 8:40 am
  • Editorial Team
    Editorial Team added an answer I believe you may be looking for <textarea spellcheck="false"></textarea> Source:… May 16, 2026 at 8:40 am
  • Editorial Team
    Editorial Team added an answer you could use a loop and collect your data sets… May 16, 2026 at 8:40 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Related Questions

I have a WinForms .NET app that, according to the Vista Task Manager with
I have a Winforms app that has a DataGridView that is databound at runtime.
I have a DataGridView in a Winforms app that has about 1000 rows (unbound)
We have a WinForms app that runs fine on x86, but has many third-party
I have a solution that has a plain old asp.net website and a winforms
We have a huge client/server WinForms app that uses .NET remoting to pass DAOs
We have an MSI installer for a .Net WinForms app for Windows XP that
I have a winform app that has tabcontrols that are 3 layers deep. I
I'm working with a winForms app that has a listView. That listView has multi-select
I have a winforms app that needs to write out logs. The app also

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.