Page 1 of 2

WANTED: bHTML Source

Posted: Sat Sep 24, 2011 3:54 pm
by CleverBoy
Hello guys/girls, i got bHTML html editor from MikeTheDj , thanks
but now i need the source code. if anyone got it please share it ;)

Thaank you

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 3:54 pm
by Agust1337
Why do you need the source?

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 3:59 pm
by CleverBoy
wow fast replay, hmm i need the source because i want to make my own html editor for my website, and bHTML isnt completed so i wanna get some codes from it and code i wanted is:

When i edit my website in that text editor it will show me my website .. i mean..

You can type in ur html:

<hr>

and you will see it down ( webbrowser read your html xD )

hope understand

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 4:02 pm
by comathi
A simple way of acheiving the instant preview would be the following:
Code: Select all
Private sub RichTextBox1_TextChanged (byval sender as object, byval e as system.eventargs) handles RichTextBox1.TextChanged
My.Computer.FileSystem.WriteAllText(Application.StartupPath & "\html.html",RichTextBox1.Text,False)
WebBrowser1.navigate(Application.StartupPath & "\html.html")
Hope this helps :D

-Comathi-

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 4:04 pm
by CleverBoy
lol i know this is the codes so it will reload it every letter i type xD but thank you anyway i will do it right now :)

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 4:05 pm
by comathi
You're welcome, but again, this is a very simple way... There might be other ways of doing it :D

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 4:21 pm
by MrAksel
comathi wrote:
A simple way of acheiving the instant preview would be the following:
Code: Select all
Private sub RichTextBox1_TextChanged (byval sender as object, byval e as system.eventargs) handles RichTextBox1.TextChanged
My.Computer.FileSystem.WriteAllText(Application.StartupPath & "\html.html",RichTextBox1.Text,False)
WebBrowser1.navigate(Application.StartupPath & "\html.html")
Hope this helps :D

-Comathi-
CleverBoy wrote:
lol i know this is the codes so it will reload it every letter i type xD but thank you anyway i will do it right now :)
Yeah, there is a simpler and faster way. It does not save the file first. You can use the WebBrowser.DocumentText property to set the page data.

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 4:37 pm
by CleverBoy
ty mraksel
now i need other help :D
how i do the color thingy?

i mean i know how to make a color dialog.. but when i choose color i want it to be like "<font color=#808080>" how?

Thankx

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 5:10 pm
by MrAksel
CleverBoy wrote:
but when i choose color i want it to be like "<font color=#808080>" how?

Thankx
You could use the ColorTranslator class. It has a method named ToHTML, you can use it like this
Code: Select all
Dim Color As Color = Color.Black 'Or whatever
Dim HTML As String = ColorTranslator.ToHTML(Color)
MsgBox(HTML)

Re: WANTED: bHTML Source

Posted: Sat Sep 24, 2011 5:22 pm
by CleverBoy
Thank you ;)