Recently, the MSHTML component was used to control various elements in the web page in the C # WinForm program and test everything on your computer. However, when the client is released, some of these functions are always unavailable (the most annoying is that the program does not report an error). After many tests, I finally found that the client cannot call the MSHTML component normally!
The MSHTML component is a COM component released by Microsoft. It is installed by default in most Windows. COM components do not have any problems, so there is only one possibility:. Net encapsulation. After careful viewing, VS2005 put the COM component's fuse library in the Windows directory, rather than in the Debug or Release directory of the program as in the VS2003 era,
After understanding this principle, the solution is simple. You just need to copy Microsoft. MSHTML. dll referenced by mshtml to your EXE directory for release!
Appendix: Microsoft. mshtml. dll