Results 1 to 3 of 3

Thread: DHTMLED Basic but Important Questions

  1. #1

    Thread Starter
    Fanatic Member gaouser's Avatar
    Join Date
    Mar 2022
    Location
    Turkey, down the old sides of Fatih
    Posts
    607

    Question DHTMLED Basic but Important Questions

    Code:
    Option Explicit
    Private Const BOLDHEAD= "<b>"
    Private Const BOLDTAIL = "</b>"
    Dim cInnerHTML As String
    Dim DHTMLEditInitialized As Boolean
    
    
    
    Private Sub Check1_Click()
    If Check1.Value = 1 Then
           cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
           DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & HEAD_STYLE
           Else
           cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
           DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "</b>"
    End If
    End Sub
    
    
    
    Private Sub Check2_Click()
    If Check2.Value = 1 Then
           cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
           DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "<i>"
           Else
           cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
           DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "</i>"
    End If
    End Sub
    
    Private Sub Command1_Click()
    
    
    
    
                  WebBrowser1.Navigate2 "about:blank"
                  DoEvents
                  WebBrowser1.Document.Open
                   WebBrowser1.Document.Write DHTMLEdit1.DOM.body.outerhtml
                   WebBrowser1.Document.Close
                   
    
    End Sub
    
    Private Sub Command2_Click()
           cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
    DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "<font face=" & """" & Text1.Text & """" & " > "
    End Sub
    
    Private Sub Command4_Click()
    cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
    DHTMLEdit1.DOM.body.innerHTML = cInnerHTML & "<font size=" & Slider1.Value & ">"
    End Sub
    
    Private Sub Form_Load()
    
    End Sub
    

    Hi guys! I was making a project with the DHTMLED control i heard newly about
    I have some questions with the control tho
    The code is on up if needed to look

    1. How to properly add a tag I tried using only adding the head(start tag) or adding both, both they dont really work well, I need it to both make it in same line if can(this means form tags, header tags and P tags are exception because its impossible without CSS and im trying to avoid css for the project)
    2.How to make that properly added tag get added to selected area if there is
    Last edited by gaouser; Nov 27th, 2023 at 02:17 PM.

    got nuthin' to do but to make a new project, hype, then give up

    Check out all my cool stuff btw
    VB: EveryDiscord, a Discord client made fully in VB6 | MSPaint Modifier, a VB6-based MSPaint hooking engine, experimental | OpenIM, a fully VB6 instant messaging service based on TCP/IP connections | Kadooki (Overall the AltWWW project), the WWW re-imagined by me with continuations of HTML3.2's parts. | ClaFeed, A little feed algorithm I have been developing for a Twitter-style system. | CfmOS PC, my project CfmOS ported to VB6 in order to prototype faster, often lags on updates though!

    C: LegacyResource, a little ResHacker ripoff | CfmOS, A mobile OS designed to mimic AOSP (Stock Android) on an ESP32-S3, featuring a full bytecode architecture

  2. #2
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: DHTMLED Basic but Important Questions

    What does this contain when you try to write it out to the webbrowser?

    -tg
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  3. #3

    Thread Starter
    Fanatic Member gaouser's Avatar
    Join Date
    Mar 2022
    Location
    Turkey, down the old sides of Fatih
    Posts
    607

    Re: DHTMLED Basic but Important Questions

    The input is written by user
    The problem with the tag creation is its extremely buggy, sometimes you cant close a tag, its usually hard to use font tags etc

    got nuthin' to do but to make a new project, hype, then give up

    Check out all my cool stuff btw
    VB: EveryDiscord, a Discord client made fully in VB6 | MSPaint Modifier, a VB6-based MSPaint hooking engine, experimental | OpenIM, a fully VB6 instant messaging service based on TCP/IP connections | Kadooki (Overall the AltWWW project), the WWW re-imagined by me with continuations of HTML3.2's parts. | ClaFeed, A little feed algorithm I have been developing for a Twitter-style system. | CfmOS PC, my project CfmOS ported to VB6 in order to prototype faster, often lags on updates though!

    C: LegacyResource, a little ResHacker ripoff | CfmOS, A mobile OS designed to mimic AOSP (Stock Android) on an ESP32-S3, featuring a full bytecode architecture

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width