Solved

HTML WYSIWYG editor for c# desktop application

Posted on 2003-11-18
15
5,499 Views
Last Modified: 2013-12-16
I need to create an html wysiwyg editor in my windows form application with drag-drop features. If i use web-browser component to display the html page , user wont be able to interact with the controls in the page. Any suggestions ,how to go about???

Thanks in advance....
Sree
0
Comment
Question by:msreekm
  • 8
  • 4
  • 2
  • +1
15 Comments
 
LVL 1

Expert Comment

by:AJMartin
Comment Utility
Consider over-riding the drag-drop events? That way the user will still be able to click links on the page.

I hope that helps!
0
 
LVL 6

Expert Comment

by:purpleblob
Comment Utility
I believe the web browser control which comes as part of IE can be switched to editor mode, this may get you a long way along in your goal.

Check out http://www.itwriting.com/htmleditor/index.php this may be of interest
0
 
LVL 4

Author Comment

by:msreekm
Comment Utility
thanks ill get back to u soon ....
0
 
LVL 4

Author Comment

by:msreekm
Comment Utility
            Microsoft.Mshtml.dll Primary Interop Assembly looks too large for this application... (7820 kb) ,really not sure if this will work...  because this application is supposed to be downloadable for users thru internet.

 
0
 
LVL 6

Expert Comment

by:purpleblob
Comment Utility
There are ways of working with the controls without using the interop assembly - you could hand code the interfaces that you intend to use, but not sure how much work this would require - I wonder if you could uses a tool such as Lutz Roeder's Reflector to decompile the interop and copy and paste the interfaces you require.

Otherwise you'll going to have to write an HTML editor by hand, obviously with the browser control you'll have something which outputs as per IE.
0
 
LVL 4

Author Comment

by:msreekm
Comment Utility
the HTMLEDIT project doesnt open in vs.net earlier version, I guess it was done in vs.net 2003, which i donot have , how to proceed???
0
 
LVL 4

Author Comment

by:msreekm
Comment Utility
the HTMLEDITOR contorl project doesnt open in vs.net earlier version, I guess it was done in vs.net 2003, which i donot have , how to proceed???
0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 6

Expert Comment

by:purpleblob
Comment Utility
Check out http://www.eggheadcafe.com/articles/20030425.asp there's a util here (if I recall) which can convert 2003 to 2002 projects
0
 
LVL 4

Author Comment

by:msreekm
Comment Utility
that itself was made in 2003 , how will i use tht?
error message-
c:\win.......framwork\v1.1.4322  mwscorwks.dll not found???
0
 
LVL 4

Author Comment

by:msreekm
Comment Utility
I tried creating new solution and project in  the earlier studio version  and then added all files to it . created a win form and user contrl project and added resp files.. now iam not able tofigure out what references are made in usercontrol and win form project. i get lot of errors while compiling like.

C:\rediffHtmlEdit\HtmlEditorControl\HtmlEditorControl.cs(18): The type or namespace name 'mshtml' could not be found (are you missing a using directive or an assembly reference?)

C:\rediffHtmlEdit\HtmlEditorControl\HtmlEditorControl.cs(1746): The type or namespace name 'AxSHDocVw' could not be found (are you missing a using directive or an assembly reference?)


how do i find out what references should i make?
0
 
LVL 4

Author Comment

by:msreekm
Comment Utility
Sorry I didnt specify that iam not using the control you said...I got it from ...
http://windowsforms.net/articles/htmleditor.aspx
0
 
LVL 6

Accepted Solution

by:
purpleblob earned 70 total points
Comment Utility
With regards your previous to last comment, sorry I wasn't aware this utility was a 2003 build.

Anyway in answer to your last points.

Simply go to the references section of your solution, it will probably highlight mshtml and AxShDocView as missing, delete them then right mouse click and select Add Reference...

Now in the COM tab locate Microsoft HTML Object library - this will give the mshtml reference and press select, now locate (from the same tab) Microsoft Internet Controls and select, then press OK. This should supply the interops you require.
0
 
LVL 4

Author Comment

by:msreekm
Comment Utility
thnks i fixed it with a conversion tool i obtained from the belwo link
which apparently microsoft support team gave me.

here is the mail to share with you guys ...

------------------------------------------------------------------

the issue you are having is the contents of the forms/controls associated resx files. If one open the Html Editor Control resx file you will see the following entry:
 
editorWebBrowser.BackgroundImage
System.Resources.ResXNullRef, System.Windows.Forms, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
 
For VS2002 the version should be: 1.0.3300.
There is a program someone wrote at http://www.codeproject.com/macro/vsconvert.asp?print=true which does the conversion.
 
The steps listed are
In SLN files, the 8.0 must be replaced with 7.0.
In vcproj files (and only vcproj), the 7.10 part must be replaced by 7.0.
In VB.NET or C# project files, 7.10.xxxx is replaced with 7.0.9466, where xxxx is the build number of VS.NET 7.1
Also in VB.NET and C# projects, the schema version 2.0 should be replaced with 1.0.
In RESX files, the types declared are 1.0.5000 and must be replaced with 1.0.3300.
Finally, in RESX files (binary streams), the base-64 encoded part that describes the version of the stream must change from LjAuNTAw to LjAuMzMw (basically base-64-encoded versions of 1.0.5000 and 1.0.3300 respectively)
 
Hopefully this helps.

Carl Nolan
Senior Consultant
US National Services


------------------------------------------------------------------


now eerything is working fine after conversion.

I want to deploy this application in a web server , to be downloaded for the users from a web page. now the entire application compiles to around 1mb with all dlls. How do i package this with the runtime so that all users who doesnt have clr installed should be able to install it and run from their desktops. (something like IMs (MSN,YAHOO) . setup should automatically detect the runtime presence. now will the inclusion of runtime  increase the size of application considerably?

thanks for all answers. I will release the points after this ...
0
 

Expert Comment

by:KevinSean206
Comment Utility
There is a workspace on GotDotNet.com that deals with this issue by modifying the boot-strapper for the packaged vs.net installer to automatically detect and download (if neccessary) the .Net framework as opposed to the default behavior of the installer which directs the user to the proper URL to download the framework themselves. To find it, look through the workspace directory on gotdotnet.com

Kevin.
0
 

Expert Comment

by:KevinSean206
Comment Utility
There is a workspace on GotDotNet.com that deals with this issue by modifying the boot-strapper for the packaged vs.net installer to automatically detect and download (if neccessary) the .Net framework as opposed to the default behavior of the installer which directs the user to the proper URL to download the framework themselves. To find it, look through the workspace directory on gotdotnet.com

Kevin.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The purpose of this video is to demonstrate how to connect a WordPress website to Google Analytics. This will be demonstrated using a Windows 8 PC Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php :…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now