home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / grafik / backgr / frmchoos.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1994-09-22  |  8.5 KB  |  274 lines

  1. VERSION 2.00
  2. Begin Form frmChooser 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   3  'Fixed Double
  5.    Caption         =   "Chooser"
  6.    ClientHeight    =   2352
  7.    ClientLeft      =   1476
  8.    ClientTop       =   2256
  9.    ClientWidth     =   6372
  10.    Height          =   2772
  11.    KeyPreview      =   -1  'True
  12.    Left            =   1428
  13.    LinkTopic       =   "Form1"
  14.    ScaleHeight     =   2352
  15.    ScaleWidth      =   6372
  16.    Top             =   1884
  17.    Width           =   6468
  18.    Begin TextBox txtGradiant 
  19.       Height          =   288
  20.       Left            =   1296
  21.       TabIndex        =   14
  22.       Top             =   2004
  23.       Width           =   1212
  24.    End
  25.    Begin CommandButton cmdOK 
  26.       Caption         =   "&OK"
  27.       Default         =   -1  'True
  28.       Height          =   312
  29.       Left            =   2556
  30.       TabIndex        =   13
  31.       Top             =   2004
  32.       Width           =   1032
  33.    End
  34.    Begin Frame fraStyle 
  35.       BackColor       =   &H00C0C0C0&
  36.       Caption         =   "Style"
  37.       Height          =   1920
  38.       Left            =   3060
  39.       TabIndex        =   5
  40.       Top             =   60
  41.       Width           =   3072
  42.       Begin CheckBox chkInvert 
  43.          BackColor       =   &H00C0C0C0&
  44.          Caption         =   "Invert"
  45.          ForeColor       =   &H00000080&
  46.          Height          =   192
  47.          Left            =   180
  48.          TabIndex        =   11
  49.          Top             =   1500
  50.          Width           =   1332
  51.       End
  52.       Begin OptionButton optStyle 
  53.          BackColor       =   &H00C0C0C0&
  54.          Caption         =   "Outer Edges to Center Circle"
  55.          Height          =   252
  56.          Index           =   4
  57.          Left            =   180
  58.          TabIndex        =   10
  59.          Top             =   1200
  60.          Width           =   2652
  61.       End
  62.       Begin OptionButton optStyle 
  63.          BackColor       =   &H00C0C0C0&
  64.          Caption         =   "Outer Edges to Center Square"
  65.          Height          =   252
  66.          Index           =   3
  67.          Left            =   180
  68.          TabIndex        =   9
  69.          Top             =   960
  70.          Width           =   2832
  71.       End
  72.       Begin OptionButton optStyle 
  73.          BackColor       =   &H00C0C0C0&
  74.          Caption         =   "Top Right to Center"
  75.          Height          =   252
  76.          Index           =   2
  77.          Left            =   180
  78.          TabIndex        =   8
  79.          Top             =   720
  80.          Width           =   2412
  81.       End
  82.       Begin OptionButton optStyle 
  83.          BackColor       =   &H00C0C0C0&
  84.          Caption         =   "Top Left to Center"
  85.          Height          =   252
  86.          Index           =   1
  87.          Left            =   180
  88.          TabIndex        =   7
  89.          Top             =   480
  90.          Width           =   2412
  91.       End
  92.       Begin OptionButton optStyle 
  93.          BackColor       =   &H00C0C0C0&
  94.          Caption         =   "Top to Bottom"
  95.          Height          =   252
  96.          Index           =   0
  97.          Left            =   180
  98.          TabIndex        =   6
  99.          Top             =   240
  100.          Width           =   2412
  101.       End
  102.    End
  103.    Begin Frame fraColors 
  104.       BackColor       =   &H00C0C0C0&
  105.       Caption         =   "Colors"
  106.       Height          =   1908
  107.       Left            =   72
  108.       TabIndex        =   0
  109.       Top             =   60
  110.       Width           =   2952
  111.       Begin CheckBox chkCustom 
  112.          BackColor       =   &H00C0C0C0&
  113.          Caption         =   "Custom"
  114.          ForeColor       =   &H00000080&
  115.          Height          =   192
  116.          Left            =   144
  117.          TabIndex        =   18
  118.          Top             =   1560
  119.          Width           =   1944
  120.       End
  121.       Begin CheckBox chkPalette 
  122.          BackColor       =   &H00C0C0C0&
  123.          Caption         =   "Use One Palette(59 Shades)"
  124.          ForeColor       =   &H00000080&
  125.          Height          =   192
  126.          Left            =   120
  127.          TabIndex        =   12
  128.          Top             =   1320
  129.          Width           =   2652
  130.       End
  131.       Begin OptionButton optColor 
  132.          BackColor       =   &H00C0C0C0&
  133.          Caption         =   "Purple"
  134.          Height          =   252
  135.          Index           =   3
  136.          Left            =   120
  137.          TabIndex        =   4
  138.          Top             =   1020
  139.          Width           =   2412
  140.       End
  141.       Begin OptionButton optColor 
  142.          BackColor       =   &H00C0C0C0&
  143.          Caption         =   "Green"
  144.          Height          =   252
  145.          Index           =   2
  146.          Left            =   120
  147.          TabIndex        =   3
  148.          Top             =   780
  149.          Width           =   1212
  150.       End
  151.       Begin OptionButton optColor 
  152.          BackColor       =   &H00C0C0C0&
  153.          Caption         =   "Blue"
  154.          Height          =   252
  155.          Index           =   1
  156.          Left            =   108
  157.          TabIndex        =   2
  158.          Top             =   552
  159.          Width           =   1152
  160.       End
  161.       Begin OptionButton optColor 
  162.          BackColor       =   &H00C0C0C0&
  163.          Caption         =   "Red"
  164.          Height          =   252
  165.          Index           =   0
  166.          Left            =   120
  167.          TabIndex        =   1
  168.          Top             =   300
  169.          Width           =   1248
  170.       End
  171.       Begin Label lblCaption 
  172.          BackColor       =   &H00C0C0C0&
  173.          Caption         =   "From:       To:"
  174.          Height          =   252
  175.          Left            =   588
  176.          TabIndex        =   19
  177.          Top             =   456
  178.          Visible         =   0   'False
  179.          Width           =   1284
  180.       End
  181.       Begin Label lblFrom 
  182.          Alignment       =   2  'Center
  183.          BackColor       =   &H00000000&
  184.          BorderStyle     =   1  'Fixed Single
  185.          Height          =   576
  186.          Left            =   564
  187.          TabIndex        =   17
  188.          Top             =   756
  189.          Visible         =   0   'False
  190.          Width           =   624
  191.       End
  192.       Begin Label lblTo 
  193.          Alignment       =   2  'Center
  194.          BackColor       =   &H000000FF&
  195.          BorderStyle     =   1  'Fixed Single
  196.          Height          =   576
  197.          Left            =   1260
  198.          TabIndex        =   16
  199.          Top             =   756
  200.          Visible         =   0   'False
  201.          Width           =   624
  202.       End
  203.    End
  204.    Begin CommonDialog CMDialog1 
  205.       Left            =   0
  206.       Top             =   0
  207.    End
  208.    Begin Label Label1 
  209.       Alignment       =   1  'Right Justify
  210.       BackColor       =   &H00C0C0C0&
  211.       Caption         =   "# of Steps:"
  212.       Height          =   252
  213.       Left            =   156
  214.       TabIndex        =   15
  215.       Top             =   2064
  216.       Width           =   1092
  217.    End
  218. Option Explicit
  219. Dim mintColor%
  220. Sub chkCustom_Click ()
  221. optColor(0).Visible = chkCustom.Value - 1
  222. optColor(1).Visible = chkCustom.Value - 1
  223. optColor(2).Visible = chkCustom.Value - 1
  224. optColor(3).Visible = chkCustom.Value - 1
  225. chkPalette.Visible = chkCustom.Value - 1
  226. lblFrom.Visible = chkCustom.Value
  227. lblTo.Visible = chkCustom.Value
  228. lblCaption.Visible = chkCustom.Value
  229. If chkCustom.Value Then
  230.     mintColor = fraColors.Tag
  231.     fraColors.Tag = 4
  232.     fraColors.Tag = mintColor
  233. End If
  234. End Sub
  235. Sub cmdOK_Click ()
  236. Dim i%
  237. If Val(txtGradiant) > 236 Then
  238.     If MsgBox("You have specified more than 236 colors, this will remove colors from the system palette, Are you Sure?", 36) <> 6 Then
  239.         Exit Sub
  240.     End If
  241. End If
  242. If fraColors.Tag = 4 Then
  243.     i = CreateBitmap((txtGradiant), glngFrom, glngTo)
  244. End If
  245. Me.Hide
  246. End Sub
  247. Sub Form_KeyPress (keyascii As Integer)
  248. If keyascii = 13 Then Me.Hide
  249. End Sub
  250. Sub Form_Load ()
  251. Me.Left = Screen.Width / 2 - Me.Width / 2
  252. Me.Top = Screen.Height / 2 - Me.Height / 2
  253. lblFrom.BackColor = glngFrom
  254. lblTo.BackColor = glngTo
  255. End Sub
  256. Sub lblFrom_Click ()
  257.     cmdialog1.Color = glngFrom
  258.     cmdialog1.Action = 3
  259.     glngFrom = cmdialog1.Color
  260.     lblFrom.BackColor = glngFrom
  261. End Sub
  262. Sub lblTo_Click ()
  263.     cmdialog1.Color = glngTo
  264.     cmdialog1.Action = 3
  265.     glngTo = cmdialog1.Color
  266.     lblTo.BackColor = glngTo
  267. End Sub
  268. Sub optColor_Click (index As Integer)
  269. fraColors.Tag = index
  270. End Sub
  271. Sub optStyle_Click (index As Integer)
  272. fraStyle.Tag = index
  273. End Sub
  274.