home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 5_2007-2008.ISO / data / Zips / Cruddy_3-D2036341282006.psc / 3DText / frm3DText.frm next >
Text File  |  2006-12-08  |  10KB  |  346 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "Comdlg32.ocx"
  3. Begin VB.Form frm3DText 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "3D-Text: Programmed By Kenneth Roberts (AKA Bugz)"
  6.    ClientHeight    =   3975
  7.    ClientLeft      =   45
  8.    ClientTop       =   435
  9.    ClientWidth     =   6975
  10.    LinkTopic       =   "Form1"
  11.    MaxButton       =   0   'False
  12.    ScaleHeight     =   3975
  13.    ScaleWidth      =   6975
  14.    StartUpPosition =   2  'CenterScreen
  15.    Begin MSComDlg.CommonDialog cdColorPicker 
  16.       Left            =   3360
  17.       Top             =   1800
  18.       _ExtentX        =   847
  19.       _ExtentY        =   847
  20.       _Version        =   393216
  21.    End
  22.    Begin VB.TextBox txtToDisplay 
  23.       Height          =   285
  24.       Left            =   3840
  25.       TabIndex        =   8
  26.       Top             =   1560
  27.       Width           =   3015
  28.    End
  29.    Begin VB.OptionButton optAlign 
  30.       Caption         =   "Right-Alignment"
  31.       Height          =   255
  32.       Index           =   2
  33.       Left            =   120
  34.       TabIndex        =   5
  35.       Top             =   1080
  36.       Width           =   1815
  37.    End
  38.    Begin VB.OptionButton optAlign 
  39.       Caption         =   "Center-Alignment"
  40.       Height          =   255
  41.       Index           =   1
  42.       Left            =   120
  43.       TabIndex        =   4
  44.       Top             =   720
  45.       Value           =   -1  'True
  46.       Width           =   1815
  47.    End
  48.    Begin VB.OptionButton optAlign 
  49.       Caption         =   "Left-Alignment"
  50.       Height          =   255
  51.       Index           =   0
  52.       Left            =   120
  53.       TabIndex        =   3
  54.       Top             =   360
  55.       Width           =   1815
  56.    End
  57.    Begin VB.Label lbl 
  58.       Caption         =   "Back Color:"
  59.       Height          =   255
  60.       Index           =   5
  61.       Left            =   120
  62.       TabIndex        =   15
  63.       Top             =   1800
  64.       Width           =   975
  65.    End
  66.    Begin VB.Label lbl 
  67.       Caption         =   "Front Color:"
  68.       Height          =   255
  69.       Index           =   4
  70.       Left            =   120
  71.       TabIndex        =   14
  72.       Top             =   1440
  73.       Width           =   975
  74.    End
  75.    Begin VB.Label lblColor 
  76.       BackColor       =   &H00130095&
  77.       BorderStyle     =   1  'Fixed Single
  78.       Height          =   375
  79.       Index           =   1
  80.       Left            =   1320
  81.       TabIndex        =   13
  82.       Top             =   1800
  83.       Width           =   495
  84.    End
  85.    Begin VB.Label lblColor 
  86.       BackColor       =   &H000000FF&
  87.       BorderStyle     =   1  'Fixed Single
  88.       Height          =   375
  89.       Index           =   0
  90.       Left            =   1320
  91.       TabIndex        =   12
  92.       Top             =   1440
  93.       Width           =   495
  94.    End
  95.    Begin VB.Label lblInfo 
  96.       Caption         =   $"frm3DText.frx":0000
  97.       Height          =   1695
  98.       Left            =   120
  99.       TabIndex        =   11
  100.       Top             =   2160
  101.       Width           =   4695
  102.    End
  103.    Begin VB.Shape shpHUDCenter 
  104.       FillStyle       =   0  'Solid
  105.       Height          =   375
  106.       Left            =   5640
  107.       Shape           =   3  'Circle
  108.       Top             =   2820
  109.       Width           =   375
  110.    End
  111.    Begin VB.Image cmdArrow 
  112.       Height          =   510
  113.       Index           =   3
  114.       Left            =   5680
  115.       Picture         =   "frm3DText.frx":020F
  116.       Top             =   3180
  117.       Width           =   300
  118.    End
  119.    Begin VB.Image cmdArrow 
  120.       Height          =   510
  121.       Index           =   2
  122.       Left            =   5680
  123.       Picture         =   "frm3DText.frx":0A49
  124.       Top             =   2320
  125.       Width           =   300
  126.    End
  127.    Begin VB.Image cmdArrow 
  128.       Height          =   300
  129.       Index           =   1
  130.       Left            =   5160
  131.       Picture         =   "frm3DText.frx":1283
  132.       Top             =   2880
  133.       Width           =   510
  134.    End
  135.    Begin VB.Image cmdArrow 
  136.       Height          =   300
  137.       Index           =   0
  138.       Left            =   6000
  139.       Picture         =   "frm3DText.frx":1AE5
  140.       Top             =   2880
  141.       Width           =   510
  142.    End
  143.    Begin VB.Line Lines 
  144.       Index           =   4
  145.       X1              =   4920
  146.       X2              =   6720
  147.       Y1              =   2160
  148.       Y2              =   2160
  149.    End
  150.    Begin VB.Shape shpHudBG 
  151.       Height          =   1935
  152.       Left            =   4920
  153.       Top             =   1920
  154.       Width           =   1815
  155.    End
  156.    Begin VB.Label lbl 
  157.       Caption         =   "3D Text To Display:"
  158.       Height          =   255
  159.       Index           =   1
  160.       Left            =   2040
  161.       TabIndex        =   7
  162.       Top             =   1560
  163.       Width           =   1815
  164.    End
  165.    Begin VB.Shape shpHUD 
  166.       Height          =   1455
  167.       Left            =   4920
  168.       Shape           =   3  'Circle
  169.       Top             =   2280
  170.       Width           =   1815
  171.    End
  172.    Begin VB.Label lbl 
  173.       Caption         =   "Alignment:"
  174.       Height          =   255
  175.       Index           =   0
  176.       Left            =   120
  177.       TabIndex        =   6
  178.       Top             =   0
  179.       Width           =   1815
  180.    End
  181.    Begin VB.Label lblFront 
  182.       Alignment       =   2  'Center
  183.       BackStyle       =   0  'Transparent
  184.       BeginProperty Font 
  185.          Name            =   "Arial"
  186.          Size            =   30
  187.          Charset         =   0
  188.          Weight          =   700
  189.          Underline       =   0   'False
  190.          Italic          =   0   'False
  191.          Strikethrough   =   0   'False
  192.       EndProperty
  193.       Height          =   975
  194.       Left            =   2160
  195.       TabIndex        =   1
  196.       Top             =   360
  197.       Width           =   4575
  198.    End
  199.    Begin VB.Shape shpBG 
  200.       Height          =   1215
  201.       Left            =   2040
  202.       Top             =   240
  203.       Width           =   4815
  204.    End
  205.    Begin VB.Label lblBack 
  206.       Alignment       =   2  'Center
  207.       BackStyle       =   0  'Transparent
  208.       BeginProperty Font 
  209.          Name            =   "Arial"
  210.          Size            =   30
  211.          Charset         =   0
  212.          Weight          =   700
  213.          Underline       =   0   'False
  214.          Italic          =   0   'False
  215.          Strikethrough   =   0   'False
  216.       EndProperty
  217.       Height          =   975
  218.       Left            =   2220
  219.       TabIndex        =   2
  220.       Top             =   350
  221.       Width           =   4575
  222.    End
  223.    Begin VB.Label lblBackground 
  224.       BeginProperty Font 
  225.          Name            =   "MS Sans Serif"
  226.          Size            =   24
  227.          Charset         =   0
  228.          Weight          =   700
  229.          Underline       =   0   'False
  230.          Italic          =   0   'False
  231.          Strikethrough   =   0   'False
  232.       EndProperty
  233.       Height          =   1215
  234.       Left            =   2060
  235.       TabIndex        =   0
  236.       Top             =   230
  237.       Width           =   4815
  238.    End
  239.    Begin VB.Label lbl 
  240.       Alignment       =   2  'Center
  241.       Caption         =   "HUD:"
  242.       Height          =   255
  243.       Index           =   2
  244.       Left            =   4920
  245.       TabIndex        =   9
  246.       Top             =   1950
  247.       Width           =   1935
  248.    End
  249.    Begin VB.Label lbl 
  250.       Caption         =   "3-D Text Display Window:"
  251.       Height          =   255
  252.       Index           =   3
  253.       Left            =   2040
  254.       TabIndex        =   10
  255.       Top             =   0
  256.       Width           =   2175
  257.    End
  258. End
  259. Attribute VB_Name = "frm3DText"
  260. Attribute VB_GlobalNameSpace = False
  261. Attribute VB_Creatable = False
  262. Attribute VB_PredeclaredId = True
  263. Attribute VB_Exposed = False
  264. Option Explicit
  265. '3-D Text coded by Kenneth Roberts (AKA Bugz)
  266. 'Date Programmed: December 05, 2006
  267. 'Date Released: December 05, 2006
  268.  
  269. Private Sub cmdArrow_Click(Index As Integer)
  270. 'For more information on how the index is used, please view the
  271. 'optAlign_Click Sub
  272. '-
  273. 'We then Align both of the labels, the front label (lblFront) and the
  274. 'back label (lblBack).
  275. 'What gives this the 3-D look, is that one label (lblBack)
  276. 'is placed slightly higher/lower and a little to the left/right of lblFront.
  277.  
  278. Select Case Index
  279.   Case 0 'Right Arrow
  280.     lblBack.Left = lblBack.Left + 10
  281.   Case 1 'Left Arrow
  282.     lblBack.Left = lblBack.Left - 10
  283.   Case 2 'Up Arrow
  284.     lblBack.Top = lblBack.Top - 10
  285.   Case 3 'Down Arrow
  286.     lblBack.Top = lblBack.Top + 10
  287. End Select
  288. End Sub
  289.  
  290. Private Sub Form_Load()
  291. lblBackground.BackColor = vbBlack
  292. lblFront.ForeColor = lblColor(0).BackColor '&HFF& OR vbRed
  293. lblBack.ForeColor = lblColor(1).BackColor '&H130095
  294. txtToDisplay.Text = "3-D Text"
  295. End Sub
  296.  
  297. Private Sub lblColor1_Click()
  298. End Sub
  299.  
  300. Private Sub lblColor_Click(Index As Integer)
  301. On Error GoTo ErrColor: 'Add a little Error Routine.
  302. 'Show our color picker with Microsoft's nifty Common Dialog control.
  303. cdColorPicker.ShowColor
  304.  
  305. 'Heres that index again.. Darn thing wont go away for anything.
  306. Select Case Index
  307.   Case 0
  308.     lblColor(0).BackColor = cdColorPicker.Color
  309.     lblFront.ForeColor = lblColor(0).BackColor
  310.   Case 1
  311.     lblColor(1).BackColor = cdColorPicker.Color
  312.     lblFront.ForeColor = lblColor(1).BackColor
  313. End Select
  314.  
  315. Exit Sub
  316. ErrColor:
  317. 'We usually come here, sometimes when the cancel button is hit.
  318. 'Or something other of the sort.
  319. MsgBox "There was an error choosing your color.", vbOKOnly + vbCritical, "Error"
  320. End Sub
  321.  
  322. Private Sub optAlign_Click(Index As Integer)
  323. 'The optAlign controls are for the 3-D Text Alignment.
  324. 'We base our option off of the index provided.
  325. 'If we click on the first Option (its index is 0).
  326. 'Second Option = index 1, etc
  327. Select Case Index
  328.   Case 0 'Left Alignment
  329.     lblFront.Alignment = 0
  330.     lblBack.Alignment = 0
  331.   Case 1 'Center Alignment
  332.     lblFront.Alignment = 2
  333.     lblBack.Alignment = 2
  334.   Case 2 'Right Alignment
  335.     lblFront.Alignment = 1
  336.     lblBack.Alignment = 1
  337. End Select
  338. End Sub
  339.  
  340. Private Sub txtToDisplay_Change()
  341. 'Set the front and back label (lblFront) & (lblBack) caption as the same
  342. 'text of the txtToDisplay textbox.
  343. lblFront.Caption = txtToDisplay.Text
  344. lblBack.Caption = txtToDisplay.Text
  345. End Sub
  346.