Visual Basic Code , VB.NET Code, VB Code
  Home   :  Code   :  Forums   :  Submit   :  Mailing List   :  About   :  Contact


Need a control that can display HTML formatted text


Need a control that can display HTML formatted text

Author
Message
s.p.i.d.e.r.m.a.n
s.p.i.d.e.r.m.a.n
Forum God
Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)

Group: Forum Members
Posts: 58, Visits: 109
Hi! everybuddy

I am writing a chat program in VB6.0 to integrate it with my database application (which is a desktop application in VB6.0)  so that clients can communicate with me for help from within my application.

I want to display the chat text in html formatted way just like yahoo, yazak or msn does.

I tried peeping into yazak messenger window using Spy++ and found the class of the control used for displaying chat text to be "Internet Explorer_Server".

I tried adding webbrowser control and HTML Object Liabray's Scriplet control to my project but cudn't find a way to add text to these controls. Finally I tried the DHTML Safe and DHTML Edit controls and that worked exactly as i wanted (ie; i cud add html text to these controls at run time and also display animated gifs) but i couldn't lock these controls. Also these both controls don't have any properties like ENABLED or LOCKED
resulting the contents of these control to be altered by users.

I want to make sure that "Am i using the right control to solve my purpose?"
or is there any other control available specially to meet this scenario?

Please help...

s.p.i.d.e.r.m.a.n


dilettante
dilettante
Forum God
Forum God (3.6K reputation)Forum God (3.6K reputation)Forum God (3.6K reputation)Forum God (3.6K reputation)Forum God (3.6K reputation)Forum God (3.6K reputation)Forum God (3.6K reputation)Forum God (3.6K reputation)Forum God (3.6K reputation)

Group: Forum Members
Posts: 9, Visits: 54
I'm a big fan of using the DHTMLEdit control myself.  It offers HTML-based capabilities similar to those of the RichText control and beyond.  For displaying and allowing entry of HTML documents I find it far superior to hosting a WebBrowser control.

There are two issues with this control.

First you'll want to obtain and install the DHTMLEdit SDK, which will provide you with documentation in the form of a CHM Help file.  This is hard to find, but the redist file is named dhedsdk.exe so you might try searching for that.

Secondly, Microsoft found some serious security vulnerabilities in the control especially when hosted in a Web page.  As a result they pulled it from Vista.  The good news is that they introduced a new safer version that works in Vista but you need to download and install it.  When distributing programs using the DHTMLEdit control you really want to include this new version of DHTMLED.OCX along with its dependency TRIEDIT.DLL (which does the real work).  Sadly, unless you develop on Vista this can be a problem.  However you can install the new version into Vista and then take those two files to another OS and replace the existing files (rename the old ones first so you can undo this in case of problems).

Finally, to answer your question, the DHTMLEdit control property you probably want is called BrowseMode.  Set this to True and users cannot edit the contents of the control.

This property is only available in the version of the control that is not marked "safe for scripting" - i.e. only in the version you should use in a VB program.  Note that flipping the value will caused the document to be re-parsed and the Busy property will be True until it finishes (when the DocumentComplete event is fired).

There are lots more details in the SDK Help.

s.p.i.d.e.r.m.a.n
s.p.i.d.e.r.m.a.n
Forum God
Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)Forum God (6.6K reputation)

Group: Forum Members
Posts: 58, Visits: 109
Thank you for the information.

I used the 'WebBrowser' control to solve my purpose.

s.p.i.d.e.r.m.a.n


GO


Similar Topics


Reading This Topic


Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....

















A1VBCode Forums


Search