home *** CD-ROM | disk | FTP | other *** search
- VERSION 4.00
- Begin VB.Form frm3DText
- BorderStyle = 3 'Fixed Dialog
- Caption = "VBMax 3D Effects Demo - Text"
- ClientHeight = 4755
- ClientLeft = 2055
- ClientTop = 3330
- ClientWidth = 8535
- Height = 5160
- Icon = "3DText.frx":0000
- Left = 1995
- LinkTopic = "Form1"
- LockControls = -1 'True
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 4755
- ScaleWidth = 8535
- ShowInTaskbar = 0 'False
- Top = 2985
- Width = 8655
- Begin VB.Frame Frame4
- Caption = "Effect"
- Height = 3135
- Left = 4740
- TabIndex = 32
- Top = 1500
- Width = 2235
- Begin VB.OptionButton optEffect
- Caption = "Projected"
- Height = 255
- Index = 8
- Left = 180
- TabIndex = 22
- Top = 2760
- Width = 1155
- End
- Begin VB.OptionButton optEffect
- Caption = "Outline Left"
- Height = 255
- Index = 7
- Left = 180
- TabIndex = 21
- Top = 2460
- Width = 1275
- End
- Begin VB.OptionButton optEffect
- Caption = "Outline Right"
- Height = 255
- Index = 6
- Left = 180
- TabIndex = 20
- Top = 2160
- Width = 1335
- End
- Begin VB.OptionButton optEffect
- Caption = "Floating"
- Height = 255
- Index = 5
- Left = 180
- TabIndex = 19
- Top = 1860
- Width = 915
- End
- Begin VB.OptionButton optEffect
- Caption = "Embossed Recessed"
- Height = 255
- Index = 4
- Left = 180
- TabIndex = 18
- Top = 1560
- Width = 1995
- End
- Begin VB.OptionButton optEffect
- Caption = "Embossed Raised"
- Height = 255
- Index = 3
- Left = 180
- TabIndex = 17
- Top = 1260
- Width = 1695
- End
- Begin VB.OptionButton optEffect
- Caption = "Recessed"
- Height = 255
- Index = 2
- Left = 180
- TabIndex = 16
- Top = 960
- Width = 1155
- End
- Begin VB.OptionButton optEffect
- Caption = "Raised"
- Height = 255
- Index = 1
- Left = 180
- TabIndex = 15
- Top = 660
- Width = 915
- End
- Begin VB.OptionButton optEffect
- Caption = "Normal"
- Height = 255
- Index = 0
- Left = 180
- TabIndex = 14
- Top = 360
- Value = -1 'True
- Width = 915
- End
- End
- Begin VB.Frame Frame3
- Caption = "Shadow"
- Height = 1215
- Left = 7140
- TabIndex = 31
- Top = 1500
- Width = 1275
- Begin VB.OptionButton optShadow
- Caption = "Dark"
- Height = 255
- Index = 1
- Left = 240
- TabIndex = 24
- Top = 720
- Width = 795
- End
- Begin VB.OptionButton optShadow
- Caption = "Light"
- Height = 255
- Index = 0
- Left = 240
- TabIndex = 23
- Top = 360
- Value = -1 'True
- Width = 795
- End
- End
- Begin VB.Frame Frame2
- Caption = "Font"
- Height = 3135
- Left = 1680
- TabIndex = 28
- Top = 1500
- Width = 2895
- Begin VB.ComboBox cboFontNames
- Height = 315
- Left = 180
- Sorted = -1 'True
- Style = 2 'Dropdown List
- TabIndex = 8
- Top = 540
- Width = 2535
- End
- Begin VB.ComboBox cboTextSize
- Height = 1740
- Left = 180
- Style = 1 'Simple Combo
- TabIndex = 9
- Top = 1260
- Width = 915
- End
- Begin VB.CheckBox chkBold
- Caption = "Bold"
- Height = 315
- Left = 1380
- TabIndex = 10
- Top = 1620
- Width = 795
- End
- Begin VB.CheckBox chkItalic
- Caption = "Italic"
- Height = 315
- Left = 1380
- TabIndex = 11
- Top = 1980
- Width = 795
- End
- Begin VB.CheckBox chkUnderline
- Caption = "Underline"
- Height = 315
- Left = 1380
- TabIndex = 12
- Top = 2340
- Width = 1095
- End
- Begin VB.CheckBox chkStrikeout
- Caption = "Strikeout"
- Height = 315
- Left = 1380
- TabIndex = 13
- Top = 2700
- Width = 1095
- End
- Begin VB.Label Label2
- AutoSize = -1 'True
- Caption = "Name:"
- Height = 195
- Left = 180
- TabIndex = 30
- Top = 300
- Width = 465
- End
- Begin VB.Label Label3
- AutoSize = -1 'True
- Caption = "Size:"
- Height = 195
- Left = 180
- TabIndex = 29
- Top = 1020
- Width = 345
- End
- End
- Begin VB.Frame Frame1
- Caption = "Color"
- Height = 3135
- Left = 120
- TabIndex = 27
- Top = 1500
- Width = 1395
- Begin VB.OptionButton optColor
- Caption = "White"
- ForeColor = &H00FFFFFF&
- Height = 255
- Index = 8
- Left = 180
- TabIndex = 7
- Top = 2460
- Width = 1095
- End
- Begin VB.OptionButton optColor
- Caption = "Cyan"
- ForeColor = &H00FFFF00&
- Height = 255
- Index = 7
- Left = 180
- TabIndex = 6
- Top = 2160
- Width = 1095
- End
- Begin VB.OptionButton optColor
- Caption = "Magenta"
- ForeColor = &H00FF00FF&
- Height = 255
- Index = 6
- Left = 180
- TabIndex = 5
- Top = 1860
- Width = 1095
- End
- Begin VB.OptionButton optColor
- Caption = "Blue"
- ForeColor = &H00FF0000&
- Height = 255
- Index = 5
- Left = 180
- TabIndex = 4
- Top = 1560
- Width = 1095
- End
- Begin VB.OptionButton optColor
- Caption = "Yellow"
- ForeColor = &H0000FFFF&
- Height = 255
- Index = 4
- Left = 180
- TabIndex = 3
- Top = 1260
- Width = 1095
- End
- Begin VB.OptionButton optColor
- Caption = "Green"
- ForeColor = &H0000FF00&
- Height = 255
- Index = 3
- Left = 180
- TabIndex = 2
- Top = 960
- Width = 1095
- End
- Begin VB.OptionButton optColor
- Caption = "Red"
- ForeColor = &H000000FF&
- Height = 255
- Index = 2
- Left = 180
- TabIndex = 1
- Top = 660
- Width = 1095
- End
- Begin VB.OptionButton optColor
- Caption = "Black"
- ForeColor = &H00000000&
- Height = 255
- Index = 1
- Left = 180
- TabIndex = 0
- Top = 360
- Value = -1 'True
- Width = 1095
- End
- End
- Begin VB.CommandButton cmdClose
- Cancel = -1 'True
- Caption = "Close"
- Height = 495
- Left = 7200
- TabIndex = 25
- Top = 4080
- Width = 1215
- End
- Begin VB.Label Label1
- Alignment = 2 'Center
- BackStyle = 0 'Transparent
- Caption = "VBMax 3D Text Effects"
- BeginProperty Font
- name = "MS Sans Serif"
- charset = 0
- weight = 400
- size = 18
- underline = 0 'False
- italic = 0 'False
- strikethrough = 0 'False
- EndProperty
- Height = 435
- Left = 720
- TabIndex = 26
- Top = 240
- Width = 3975
- End
- Attribute VB_Name = "frm3DText"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Dim mo3D As New cls3D
- Private Sub Form_Load()
- Dim i As Integer
- Move (Screen.Width - Width) \ 2, (Screen.Height - Height) \ 2
- For i = 0 To Screen.FontCount - 1
- cboFontNames.AddItem Screen.Fonts(i)
- Next i
- With cboTextSize
- .AddItem "8"
- .AddItem "10"
- .AddItem "12"
- .AddItem "14"
- .AddItem "20"
- .AddItem "24"
- .AddItem "26"
- .AddItem "32"
- End With
- mo3D.Caption Label1, gnUSE_CONTROL_FONT
- End Sub
- Private Sub Form_Unload(Cancel As Integer)
- Set mo3D = Nothing
- Set frm3DText = Nothing
- End Sub
- Private Sub cmdClose_Click()
- Unload Me
- End Sub
- Sub RedrawText()
- Cls
- mo3D.Caption Label1
- End Sub
- Private Sub optColor_Click(Index As Integer)
- mo3D.ForeColor = optColor(Index).ForeColor
- RedrawText
- End Sub
- Private Sub cboFontNames_Click()
- mo3D.FontName = cboFontNames.Text
- RedrawText
- End Sub
- Private Sub cboTextSize_Click()
- mo3D.FontSize = cboTextSize.Text
- RedrawText
- End Sub
- Private Sub cboTextSize_Change()
- mo3D.FontSize = Val(cboTextSize.Text)
- RedrawText
- End Sub
- Private Sub chkBold_Click()
- If chkBold.Value = vbChecked Then
- mo3D.FontBold = True
- Else
- mo3D.FontBold = False
- End If
- RedrawText
- End Sub
- Private Sub chkItalic_Click()
- If chkItalic.Value = vbChecked Then
- mo3D.FontItalic = True
- Else
- mo3D.FontItalic = False
- End If
- RedrawText
- End Sub
- Private Sub chkStrikeout_Click()
- If chkStrikeout.Value = vbChecked Then
- mo3D.FontStrikethru = True
- Else
- mo3D.FontStrikethru = False
- End If
- RedrawText
- End Sub
- Private Sub chkUnderline_Click()
- If chkUnderline.Value = vbChecked Then
- mo3D.FontUnderline = True
- Else
- mo3D.FontUnderline = False
- End If
- RedrawText
- End Sub
- Private Sub optEffect_Click(Index As Integer)
- mo3D.Style = Index
- RedrawText
- End Sub
- Private Sub optShadow_Click(Index As Integer)
- Select Case Index
- Case 0: mo3D.Shadow = gnLIGHT_SHADOW
- Case 1: mo3D.Shadow = gnDARK_SHADOW
- End Select
- RedrawText
- End Sub
-