home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 3_2004-2005.ISO / Data / Zips / Exploding_1734904182004.psc / fSettings.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2004-04-18  |  14.9 KB  |  468 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
  3. Begin VB.Form fSettings 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Exploding Flowers Settings"
  6.    ClientHeight    =   4935
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   6375
  10.    ControlBox      =   0   'False
  11.    BeginProperty Font 
  12.       Name            =   "Tahoma"
  13.       Size            =   8.25
  14.       Charset         =   0
  15.       Weight          =   400
  16.       Underline       =   0   'False
  17.       Italic          =   0   'False
  18.       Strikethrough   =   0   'False
  19.    EndProperty
  20.    LinkTopic       =   "Form1"
  21.    MaxButton       =   0   'False
  22.    ScaleHeight     =   4935
  23.    ScaleWidth      =   6375
  24.    StartUpPosition =   3  'Windows Default
  25.    Begin VB.Frame Frame1 
  26.       Caption         =   "Credits and Thanks"
  27.       Height          =   1455
  28.       Left            =   120
  29.       TabIndex        =   32
  30.       Top             =   3360
  31.       Width           =   3135
  32.       Begin VB.Label lblCap 
  33.          Caption         =   "Carles P.V. - uber nifty cDIB32 class."
  34.          Height          =   375
  35.          Index           =   18
  36.          Left            =   120
  37.          TabIndex        =   34
  38.          Top             =   960
  39.          Width           =   2895
  40.       End
  41.       Begin VB.Label lblCap 
  42.          Caption         =   "Paul Bahlawan - original concept and flower geometry."
  43.          Height          =   495
  44.          Index           =   17
  45.          Left            =   120
  46.          TabIndex        =   33
  47.          Top             =   360
  48.          Width           =   2895
  49.       End
  50.    End
  51.    Begin MSComDlg.CommonDialog cdlColor 
  52.       Left            =   6120
  53.       Top             =   0
  54.       _ExtentX        =   847
  55.       _ExtentY        =   847
  56.       _Version        =   393216
  57.       CancelError     =   -1  'True
  58.    End
  59.    Begin VB.CommandButton cmdCancel 
  60.       Caption         =   "&Cancel"
  61.       Height          =   375
  62.       Left            =   5040
  63.       TabIndex        =   36
  64.       Top             =   4440
  65.       Width           =   1215
  66.    End
  67.    Begin VB.Frame fraBuffer 
  68.       Caption         =   "Buffer Settings"
  69.       Height          =   2655
  70.       Left            =   3360
  71.       TabIndex        =   20
  72.       Top             =   1680
  73.       Width           =   2895
  74.       Begin VB.ComboBox ddlRes 
  75.          Height          =   315
  76.          Left            =   1200
  77.          Style           =   2  'Dropdown List
  78.          TabIndex        =   22
  79.          Top             =   360
  80.          Width           =   1575
  81.       End
  82.       Begin VB.CheckBox chkFrameRate 
  83.          Caption         =   "Display Frame Rate"
  84.          Height          =   255
  85.          Left            =   120
  86.          TabIndex        =   31
  87.          Top             =   2280
  88.          Width           =   2055
  89.       End
  90.       Begin VB.CheckBox chkMode 
  91.          Caption         =   "Use Halftone Stretch (slow)"
  92.          Height          =   255
  93.          Left            =   120
  94.          TabIndex        =   30
  95.          Top             =   1920
  96.          Width           =   2535
  97.       End
  98.       Begin VB.CheckBox chkFillColor 
  99.          Caption         =   "Fill Color"
  100.          Height          =   255
  101.          Left            =   120
  102.          TabIndex        =   28
  103.          Top             =   1560
  104.          Width           =   975
  105.       End
  106.       Begin VB.TextBox txtHeight 
  107.          Height          =   285
  108.          Left            =   2040
  109.          TabIndex        =   24
  110.          Top             =   840
  111.          Width           =   375
  112.       End
  113.       Begin VB.TextBox txtWidth 
  114.          Height          =   285
  115.          Left            =   600
  116.          TabIndex        =   23
  117.          Top             =   840
  118.          Width           =   375
  119.       End
  120.       Begin VB.Label lblFillColor 
  121.          Appearance      =   0  'Flat
  122.          BackColor       =   &H0000FF00&
  123.          BorderStyle     =   1  'Fixed Single
  124.          ForeColor       =   &H80000008&
  125.          Height          =   255
  126.          Left            =   1200
  127.          TabIndex        =   29
  128.          Top             =   1560
  129.          Width           =   375
  130.       End
  131.       Begin VB.Label lblBackColor 
  132.          Appearance      =   0  'Flat
  133.          BackColor       =   &H000000FF&
  134.          BorderStyle     =   1  'Fixed Single
  135.          ForeColor       =   &H80000008&
  136.          Height          =   255
  137.          Left            =   1200
  138.          TabIndex        =   27
  139.          Top             =   1200
  140.          Width           =   375
  141.       End
  142.       Begin VB.Label lblCap 
  143.          Caption         =   "Back Color"
  144.          Height          =   255
  145.          Index           =   2
  146.          Left            =   120
  147.          TabIndex        =   25
  148.          Top             =   1200
  149.          Width           =   975
  150.       End
  151.       Begin VB.Label lblCap 
  152.          Alignment       =   1  'Right Justify
  153.          Caption         =   "Screen Resolution"
  154.          BeginProperty Font 
  155.             Name            =   "Tahoma"
  156.             Size            =   6.75
  157.             Charset         =   0
  158.             Weight          =   400
  159.             Underline       =   0   'False
  160.             Italic          =   0   'False
  161.             Strikethrough   =   0   'False
  162.          EndProperty
  163.          Height          =   375
  164.          Index           =   1
  165.          Left            =   120
  166.          TabIndex        =   21
  167.          Top             =   360
  168.          Width           =   975
  169.       End
  170.       Begin VB.Label lblCap 
  171.          Caption         =   "Width           %  x  Height            %"
  172.          Height          =   375
  173.          Index           =   3
  174.          Left            =   120
  175.          TabIndex        =   26
  176.          Top             =   840
  177.          Width           =   2655
  178.       End
  179.    End
  180.    Begin VB.Frame fraBlur 
  181.       Height          =   1575
  182.       Left            =   3360
  183.       TabIndex        =   14
  184.       Top             =   0
  185.       Width           =   2895
  186.       Begin VB.TextBox txtBlur 
  187.          Height          =   285
  188.          Left            =   960
  189.          TabIndex        =   18
  190.          Top             =   1080
  191.          Width           =   375
  192.       End
  193.       Begin VB.OptionButton optBlur 
  194.          Caption         =   "Custom Blur"
  195.          Height          =   255
  196.          Index           =   1
  197.          Left            =   240
  198.          TabIndex        =   17
  199.          Top             =   720
  200.          Width           =   1215
  201.       End
  202.       Begin VB.OptionButton optBlur 
  203.          Caption         =   "Quick Blur"
  204.          Height          =   255
  205.          Index           =   0
  206.          Left            =   240
  207.          TabIndex        =   16
  208.          Top             =   360
  209.          Width           =   1335
  210.       End
  211.       Begin VB.CheckBox chkBlur 
  212.          Caption         =   "Blur"
  213.          Height          =   255
  214.          Left            =   120
  215.          TabIndex        =   15
  216.          Top             =   0
  217.          Width           =   615
  218.       End
  219.       Begin VB.Label lblCap 
  220.          Caption         =   "Strength             (> 2 = very slow)"
  221.          Height          =   255
  222.          Index           =   0
  223.          Left            =   240
  224.          TabIndex        =   19
  225.          Top             =   1080
  226.          Width           =   2535
  227.       End
  228.    End
  229.    Begin VB.CommandButton cmdOK 
  230.       Caption         =   "&OK"
  231.       Height          =   375
  232.       Left            =   3720
  233.       TabIndex        =   35
  234.       Top             =   4440
  235.       Width           =   1215
  236.    End
  237.    Begin VB.Frame fraFlower 
  238.       Caption         =   "Flower Settings"
  239.       Height          =   3255
  240.       Left            =   120
  241.       TabIndex        =   0
  242.       Top             =   0
  243.       Width           =   3135
  244.       Begin VB.HScrollBar hsbFlower 
  245.          Height          =   255
  246.          Index           =   3
  247.          LargeChange     =   2
  248.          Left            =   720
  249.          Max             =   10
  250.          Min             =   1
  251.          TabIndex        =   13
  252.          Top             =   2280
  253.          Value           =   1
  254.          Width           =   1695
  255.       End
  256.       Begin VB.HScrollBar hsbFlower 
  257.          Height          =   255
  258.          Index           =   1
  259.          LargeChange     =   2
  260.          Left            =   720
  261.          Max             =   10
  262.          Min             =   1
  263.          TabIndex        =   2
  264.          Top             =   1440
  265.          Value           =   1
  266.          Width           =   1695
  267.       End
  268.       Begin VB.HScrollBar hsbFlower 
  269.          Height          =   255
  270.          Index           =   0
  271.          LargeChange     =   2
  272.          Left            =   720
  273.          Max             =   20
  274.          Min             =   3
  275.          TabIndex        =   1
  276.          Top             =   600
  277.          Value           =   3
  278.          Width           =   1695
  279.       End
  280.       Begin VB.Label lblCap 
  281.          Caption         =   "... more to come?  Ideas, anyone?"
  282.          ForeColor       =   &H80000011&
  283.          Height          =   255
  284.          Index           =   4
  285.          Left            =   240
  286.          TabIndex        =   3
  287.          Top             =   2880
  288.          Width           =   2655
  289.       End
  290.       Begin VB.Label lblCap 
  291.          Alignment       =   2  'Center
  292.          Caption         =   "Petal Pointiness"
  293.          Height          =   255
  294.          Index           =   11
  295.          Left            =   960
  296.          TabIndex        =   9
  297.          Top             =   2040
  298.          Width           =   1335
  299.       End
  300.       Begin VB.Label lblCap 
  301.          Caption         =   "Pointy"
  302.          Height          =   255
  303.          Index           =   10
  304.          Left            =   2520
  305.          TabIndex        =   8
  306.          Top             =   2280
  307.          Width           =   495
  308.       End
  309.       Begin VB.Label lblCap 
  310.          Alignment       =   1  'Right Justify
  311.          Caption         =   "Blunt"
  312.          Height          =   255
  313.          Index           =   14
  314.          Left            =   120
  315.          TabIndex        =   10
  316.          Top             =   2280
  317.          Width           =   495
  318.       End
  319.       Begin VB.Label lblCap 
  320.          Alignment       =   2  'Center
  321.          Caption         =   "Petal Count"
  322.          Height          =   255
  323.          Index           =   16
  324.          Left            =   1080
  325.          TabIndex        =   12
  326.          Top             =   1200
  327.          Width           =   975
  328.       End
  329.       Begin VB.Label lblCap 
  330.          Caption         =   "Bushy"
  331.          Height          =   255
  332.          Index           =   8
  333.          Left            =   2520
  334.          TabIndex        =   7
  335.          Top             =   1440
  336.          Width           =   495
  337.       End
  338.       Begin VB.Label lblCap 
  339.          Alignment       =   1  'Right Justify
  340.          Caption         =   "Sparse"
  341.          Height          =   255
  342.          Index           =   15
  343.          Left            =   120
  344.          TabIndex        =   11
  345.          Top             =   1440
  346.          Width           =   495
  347.       End
  348.       Begin VB.Label lblCap 
  349.          Alignment       =   2  'Center
  350.          Caption         =   "Flower Count"
  351.          Height          =   255
  352.          Index           =   5
  353.          Left            =   1080
  354.          TabIndex        =   4
  355.          Top             =   360
  356.          Width           =   975
  357.       End
  358.       Begin VB.Label lblCap 
  359.          Caption         =   "Many"
  360.          Height          =   255
  361.          Index           =   7
  362.          Left            =   2520
  363.          TabIndex        =   6
  364.          Top             =   600
  365.          Width           =   495
  366.       End
  367.       Begin VB.Label lblCap 
  368.          Alignment       =   1  'Right Justify
  369.          Caption         =   "Few"
  370.          Height          =   255
  371.          Index           =   6
  372.          Left            =   120
  373.          TabIndex        =   5
  374.          Top             =   600
  375.          Width           =   495
  376.       End
  377.    End
  378. Attribute VB_Name = "fSettings"
  379. Attribute VB_GlobalNameSpace = False
  380. Attribute VB_Creatable = False
  381. Attribute VB_PredeclaredId = True
  382. Attribute VB_Exposed = False
  383. Option Explicit
  384. ' redbird77@earthlink.net (2004.04.16)
  385. Private Sub chkBlur_Click()
  386. Dim bEnabled As Boolean
  387.     bEnabled = CBool(chkBlur.Value)
  388.     optBlur(0).Enabled = bEnabled
  389.     optBlur(1).Enabled = bEnabled
  390.     txtBlur.Enabled = bEnabled
  391.     lblCap(0).Enabled = bEnabled
  392. End Sub
  393. Private Sub Form_Load()
  394. ' Set the form's controls' properties based on the values of tSet (which
  395. ' was initially populated from the ini file).
  396.     With ddlRes
  397.         .AddItem "640 x 480"
  398.         .AddItem "800 x 600"
  399.         .AddItem "1024 x 768"
  400.         .AddItem "1280 x 1024"
  401.     End With
  402.     With tSet.Buffer
  403.         txtWidth.Text = .Width
  404.         txtHeight.Text = .Height
  405.         lblBackColor.BackColor = .BackColor
  406.         chkFillColor.Value = IIf(.FillColor = -1, 0, 1)
  407.         lblFillColor.BackColor = IIf(.FillColor = -1, 0, .FillColor)
  408.         chkMode.Value = .StretchMode
  409.         chkFrameRate.Value = .DisplayFrameRate
  410.         ddlRes.ListIndex = .ScreenIndex
  411.     End With
  412.     With tSet.Blur
  413.         chkBlur.Value = .Enabled
  414.         chkBlur_Click
  415.         optBlur(0).Value = .Quick
  416.         optBlur(1).Value = Not optBlur(0).Value
  417.         txtBlur.Text = .Strength
  418.     End With
  419.     With tSet.Flower
  420.         hsbFlower(0).Value = .FlowerCount
  421.         hsbFlower(1).Value = .PetalCount
  422.         hsbFlower(3).Value = .PetalPointiness
  423.     End With
  424. End Sub
  425. Private Sub cmdCancel_Click()
  426.     Unload Me
  427. End Sub
  428. Private Sub cmdOK_Click()
  429. ' Save the current control values into tSet, which upon exiting the app,
  430. ' will be written to the ini file.
  431.     With tSet.Buffer
  432.         .Width = CLng(txtWidth.Text)
  433.         .Height = CLng(txtHeight.Text)
  434.         .BackColor = lblBackColor.BackColor
  435.         .FillColor = IIf(chkFillColor.Value = 0, -1, lblFillColor.BackColor)
  436.         .StretchMode = CLng(chkMode.Value)
  437.         .DisplayFrameRate = CLng(chkFrameRate.Value)
  438.         .ScreenIndex = CLng(ddlRes.ListIndex)
  439.     End With
  440.     With tSet.Blur
  441.         .Enabled = CLng(chkBlur.Value)
  442.         .Quick = CLng(optBlur(0).Value * -1)
  443.         .Strength = CLng(txtBlur.Text)
  444.     End With
  445.     With tSet.Flower
  446.         .FlowerCount = hsbFlower(0).Value
  447.         .PetalCount = hsbFlower(1).Value
  448.         .PetalPointiness = hsbFlower(3).Value
  449.     End With
  450.     PutSettings
  451.     Unload Me
  452.                   
  453. End Sub
  454. Private Sub lblBackColor_Click()
  455. On Error GoTo ErrHandler
  456.     cdlColor.ShowColor
  457.     lblBackColor.BackColor = cdlColor.Color
  458.     Exit Sub
  459. ErrHandler:
  460. End Sub
  461. Private Sub lblFillColor_Click()
  462. On Error GoTo ErrHandler
  463.     cdlColor.ShowColor
  464.     lblFillColor.BackColor = cdlColor.Color
  465.     Exit Sub
  466. ErrHandler:
  467. End Sub
  468.