Hello everyone, I would like to know how to build an HTML editor with (drag and drop) in Visual Basic.
I'm just looking for drag and drop into html editor and autoamtic write code themself. Does anyone know how to build that in Visual basic or is there is any sample website where i can learn more about the drag and drop html editor!
Alidad

html editor in visual basic
Rey_S2006
There is a pretty interesting control for this on your system.
if you go to tools Menu and select Choose Toolbox items and select the Com Components and check - DHTMLEDIT Control for IE5 it will add this control to your tool box.
Make a form project and add this component to it and add a Textbox1 beside it. Set the textbox to multiline and make them the same size on the designer and add this code to the form. Note that I called the DHTML Control - DHTMLEdit
Add a button called cbGo
Public Class Form1
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
End Sub
Private Sub cbGo_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbGo.Click
TextBox1.Text = DHTMLEdit.DocumentHTML
End Sub
Private Sub cbExit_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles cbExit.Click
End
End Sub
End Class
Start the program and type:
Now is the time for
all good bunnies to
have fun
Press the GO button and you will see....
<HTML>
<HEAD>
<META NAME="GENERATOR" Content="Microsoft DHTML Editing Control">
<TITLE></TITLE>
</HEAD>
<BODY>
<P>Now is the time for</P>
<P>all good bunnies to</P>
<P>have fun</P>
</BODY>
</HTML>
in the textbox
This control supports drag and drop of graphics, font sizes, colors and font control etc.
There is an sdk for it, no longer supported by Microsoft and you find it on the net.
A couple of precautionary notes. There are two versions of this control as you will notice in the Choose toolbox controls step. One is secure and the other isn't. The non-secure one is also a webbrowser and will interpret script. It is also capable of opening up files on your system and following hostile scripts. You would be advised to use that one as just an editor and keep it off the net.
I found the sdk here:
http://62.77.53.204/repository/ContentManagement/node/P1346012484/dhedsdk.exe
and it has internal documentation that is excellent.
Documentation can be found here:
http://msdn.microsoft.com/archive/default.asp url=/archive/en-us/dnaredcom/html/edcomdownload.asp
This is an amazing control with lots of really interesting capabilities. Enjoy!
Andrey33
Renee C;
First of all thank you so much for informaiton, you been helpful so much, i have been read your code very carefully and understand clear, but there is problme that i have copy this code and past over on form1 in VB edtior and i'm getting error message, it said "expect: end of statment on first line when it said public class form1.
I have tried everything to solve problem in form1 but i could not be able to solve it. do you have any idea what it might wrong or how to solve that!
again thanks for your informaiton.
Alidad
Nickthegreek
Alidad,
I just started with an empty windows project (A form). I did a Cntrl-A and hit delete to clear out everything.
I then cut and pasted the exact code I gave you into from this page into the project and there was one error which was because I did not define the DHTML Control.
It all works with my copy of Team Suite.
There is another option.
Start a blank windows form project.
Add a Form Load Event
Add a GO button and then add a click event for that button.
Add the dhtml control as I showed you. You should see in in the toolbox. In design mode
copy the dhtml control onto your form and copy a similar textbox. Renane the DHTML control to dhtmledit. Set the tectbox properties to multiline = true.
Type the one line of code I gave you into the click event.
creativeluf
That's easy. It's really one line and you've copied it as two and the vb editor doesn't know it's really one line.
That happens all the time. If there are any syntax errors.... it's because the forum editor has mangled the code.
mattaz
ReneeC;
Hi, i have been spend almost more then 4 hours to follow your direction of html in visual basic, at this time i got another errors.
I was wondering if is possible that you can send me the html code in Visual basic by email where i can test it myself!
if that pssible, you can send me file by email at Alidad@comcast.net thanks.
Alidad Mdojtabai
Mike Weerasinghe
I sent you the project and the SDK.
It's always helpful when you have errors to tell us what they are.
Goodluck!
DDressel1
Reneec,
thanks for your message, at this time i have tried that by copy or retype myself I'm still getting same error message of first line "public class form1"
And then i restart all over again and typed everything, I still getting same error "expect: end of statments" i checked that end of statement "end class".
I'm not sure what did i missed any idea!
I Appreciation your help.
Alidad
hpdvs2
I was looking at the same problem and elected to buy a control - an option you might consider. The one I ended up with was from http://www.nbit.net.au/ . Reasonably priced, worked like a charm.
Rod Kimmel, Partner
Software On Sailboats
The Sales Domain
IT Toolbox WebLog: The Sales Domain