Library code snippets
Working with the document object model
By nikocom, published on 14 Jul 2001
Working with the document object model
Welcome to my first VB tutorial. VB as powerful as it is , has yet amazed me again. This time with the DHTML edit control. In this tutorial i will show you how to add a dropshadow effect to your vb web page!
Option Explicit
Private Const HEAD_STYLE = "<div ID=foo style='width :100%;filter:dropshadow'>"
Private Const TAIL_STYLE = "</div>"
Dim cInnerHTML As String
Dim DHTMLEditInitialized As Boolean
Private Sub cmddrop_Click()
Dim cInnerHTML As String
Dim oElement As IHTMLElement
Dim bdoc As HTMLBody
Command button
Set oElement = DHTMLEdit1.DOM.All.Item("foo")
If oElement Is Nothing Then
' no div style
cInnerHTML = DHTMLEdit1.DOM.body.innerHTML
Else
' just get the damn html
cInnerHTML = oElement.innerHTML
End If
' add drop shadow
DHTMLEdit1.DOM.body.innerHTML = HEAD_STYLE & cInnerHTML & TAIL_STYLE
that should do it
Related articles
Related discussion
-
Key_Press() event for text box
by Aquila (1 replies)
-
Regarding Visual Basic Programme
by manjunathsl2007 (0 replies)
-
how do you hide all in VB6
by CapnJack (1 replies)
-
Problem with Input File
by novavb6 (3 replies)
-
How to produce a txt file with a table??
by novavb6 (1 replies)
This thread is for discussions of Working with the document object model.