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
Comments