ShowTextDlg Example for Visual Basic
Dim RasterEfxDlg As New LEADRasterDlgEfx
Dim nRet As Integer
Private Sub Text_Click()
RasterEfxDlg.Text.SampleText = "Lead Tools"
RasterEfxDlg.Text.Color = RGB(0, 0, 255)
RasterEfxDlg.Text.HiliteColor = RGB(255, 255, 255)
RasterEfxDlg.Text.ShadowColor = RGB(128, 128, 128)
RasterEfxDlg.Text.TextStyle = FXD_TEXTSTYLE_NORMAL
RasterEfxDlg.Text.Align = FXD_TEXTALIGN_LEFT_TOP
RasterEfxDlg.Text.WordWrap = False
RasterEfxDlg.Text.Angle = 450
RasterEfxDlg.Text.ShadowXDepth = 10
RasterEfxDlg.Text.ShadowYDepth = 10
RasterEfxDlg.Text.EnableUseForegroundImage = True
RasterEfxDlg.UIFlags = TEXT_SHOW_PREVIEW Or _
TEXT_SAMPLETEXT Or _
TEXT_STYLE Or _
TEXT_COLOR Or _
TEXT_BORDERCOLOR Or _
TEXT_ALIGN Or _
TEXT_ANGLE Or _
TEXT_WORDWRAP Or _
TEXT_FONT Or _
TEXT_FOREIMAGE Or _
TEXT_BROWSEIMAGE Or _
TEXT_SHADOWCOLOR Or _
TEXT_SHADOW_X_Y
RasterEfxDlg.Bitmap = LEADRasterView1.Raster.Bitmap
nRet = RasterEfxDlg.ShowTextDlg (hWnd)
Text1.Text = RasterEfxDlg.Text.SampleText
Text2.Text = CStr(RasterEfxDlg.Text.Angle)
Text3.Text = CStr(RasterEfxDlg.Text.TextStyle)
Text4.Text = CStr(RasterEfxDlg.Text.Align)
Text5.Text = CStr(RasterEfxDlg.Text.WordWrap)
Text6.Text = CStr(RasterEfxDlg.Text.ShadowXDepth)
Text7.Text = CStr(RasterEfxDlg.Text.ShadowYDepth)
Text8.Text = CStr(RasterEfxDlg.Text.EnableUseForegroundImage)
Text9.Text = RasterEfxDlg.Text.Font.Name
Text10.Text = CStr(RasterEfxDlg.Text.Font.Size)
Shape1.FillColor = RasterEfxDlg.Text.Color
Shape2.FillColor = RasterEfxDlg.Text.HiliteColor
Shape3.FillColor = RasterEfxDlg.Text.ShadowColor
End Sub