home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / HTML_Disk_400811272001.psc / bgoptions.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-12-05  |  8.7 KB  |  262 lines

  1. VERSION 5.00
  2. Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
  3. Begin VB.Form bgoptions 
  4.    BorderStyle     =   1  'Fixed Single
  5.    Caption         =   "Background Options"
  6.    ClientHeight    =   3090
  7.    ClientLeft      =   45
  8.    ClientTop       =   330
  9.    ClientWidth     =   4950
  10.    Icon            =   "bgoptions.frx":0000
  11.    LinkTopic       =   "Form1"
  12.    LockControls    =   -1  'True
  13.    MaxButton       =   0   'False
  14.    ScaleHeight     =   3090
  15.    ScaleWidth      =   4950
  16.    StartUpPosition =   1  'CenterOwner
  17.    Begin VB.CommandButton cmdcancel 
  18.       Caption         =   "Cancel"
  19.       Height          =   255
  20.       Left            =   2400
  21.       TabIndex        =   12
  22.       Top             =   2760
  23.       Width           =   1215
  24.    End
  25.    Begin VB.CommandButton cmdok 
  26.       Caption         =   "OK"
  27.       Height          =   255
  28.       Left            =   1080
  29.       TabIndex        =   11
  30.       Top             =   2760
  31.       Width           =   1215
  32.    End
  33.    Begin VB.Frame Frame3 
  34.       BorderStyle     =   0  'None
  35.       Caption         =   "Frame3"
  36.       Height          =   2775
  37.       Left            =   -120
  38.       TabIndex        =   13
  39.       Top             =   -120
  40.       Width           =   4935
  41.       Begin VB.TextBox txtbgpicture 
  42.          Height          =   285
  43.          Left            =   1200
  44.          TabIndex        =   3
  45.          Top             =   600
  46.          Width           =   2655
  47.       End
  48.       Begin VB.ComboBox combvpostype 
  49.          Enabled         =   0   'False
  50.          Height          =   315
  51.          ItemData        =   "bgoptions.frx":030A
  52.          Left            =   3840
  53.          List            =   "bgoptions.frx":0314
  54.          TabIndex        =   10
  55.          Text            =   "pixels"
  56.          Top             =   2280
  57.          Width           =   855
  58.       End
  59.       Begin VB.ComboBox combhpostype 
  60.          Enabled         =   0   'False
  61.          Height          =   315
  62.          ItemData        =   "bgoptions.frx":0323
  63.          Left            =   3840
  64.          List            =   "bgoptions.frx":032D
  65.          TabIndex        =   8
  66.          Text            =   "pixels"
  67.          Top             =   1920
  68.          Width           =   855
  69.       End
  70.       Begin VB.ComboBox combvpos 
  71.          Height          =   315
  72.          ItemData        =   "bgoptions.frx":033C
  73.          Left            =   2400
  74.          List            =   "bgoptions.frx":034C
  75.          TabIndex        =   9
  76.          Top             =   2280
  77.          Width           =   1215
  78.       End
  79.       Begin VB.ComboBox combhpos 
  80.          Height          =   315
  81.          ItemData        =   "bgoptions.frx":036E
  82.          Left            =   2400
  83.          List            =   "bgoptions.frx":037E
  84.          TabIndex        =   7
  85.          Top             =   1920
  86.          Width           =   1215
  87.       End
  88.       Begin VB.CheckBox chkbgcolor 
  89.          Caption         =   "Color"
  90.          Height          =   255
  91.          Left            =   240
  92.          TabIndex        =   0
  93.          Top             =   240
  94.          Width           =   735
  95.       End
  96.       Begin VB.PictureBox Picturebgcolor 
  97.          Appearance      =   0  'Flat
  98.          BackColor       =   &H80000005&
  99.          ForeColor       =   &H80000008&
  100.          Height          =   255
  101.          Left            =   1200
  102.          ScaleHeight     =   225
  103.          ScaleWidth      =   225
  104.          TabIndex        =   1
  105.          Top             =   240
  106.          Width           =   255
  107.       End
  108.       Begin VB.CheckBox chkpicture 
  109.          Caption         =   "Picture"
  110.          Height          =   255
  111.          Left            =   240
  112.          TabIndex        =   2
  113.          Top             =   600
  114.          Width           =   855
  115.       End
  116.       Begin VB.CommandButton cmdpicturebrowse 
  117.          Caption         =   "browse"
  118.          Height          =   255
  119.          Left            =   3960
  120.          TabIndex        =   4
  121.          Top             =   600
  122.          Width           =   975
  123.       End
  124.       Begin VB.ComboBox combrepeat 
  125.          Height          =   315
  126.          ItemData        =   "bgoptions.frx":03A0
  127.          Left            =   2400
  128.          List            =   "bgoptions.frx":03B0
  129.          TabIndex        =   5
  130.          Top             =   1080
  131.          Width           =   1215
  132.       End
  133.       Begin VB.ComboBox combattach 
  134.          Height          =   315
  135.          ItemData        =   "bgoptions.frx":03DB
  136.          Left            =   2400
  137.          List            =   "bgoptions.frx":03E5
  138.          TabIndex        =   6
  139.          Top             =   1440
  140.          Width           =   1215
  141.       End
  142.       Begin MSComDlg.CommonDialog CommonDialog1 
  143.          Left            =   3960
  144.          Top             =   1080
  145.          _ExtentX        =   847
  146.          _ExtentY        =   847
  147.          _Version        =   393216
  148.       End
  149.       Begin VB.Label Label3 
  150.          Caption         =   "Repeat"
  151.          Height          =   255
  152.          Left            =   720
  153.          TabIndex        =   17
  154.          Top             =   1080
  155.          Width           =   735
  156.       End
  157.       Begin VB.Label Label4 
  158.          Caption         =   "Attachement"
  159.          Height          =   255
  160.          Left            =   720
  161.          TabIndex        =   16
  162.          Top             =   1440
  163.          Width           =   975
  164.       End
  165.       Begin VB.Label Label5 
  166.          Caption         =   "Horizontal Position"
  167.          Height          =   255
  168.          Left            =   720
  169.          TabIndex        =   15
  170.          Top             =   1920
  171.          Width           =   1335
  172.       End
  173.       Begin VB.Label Label6 
  174.          Caption         =   "Vertical Position"
  175.          Height          =   255
  176.          Left            =   720
  177.          TabIndex        =   14
  178.          Top             =   2280
  179.          Width           =   1335
  180.       End
  181.    End
  182. Attribute VB_Name = "bgoptions"
  183. Attribute VB_GlobalNameSpace = False
  184. Attribute VB_Creatable = False
  185. Attribute VB_PredeclaredId = True
  186. Attribute VB_Exposed = False
  187. Private Sub cmdcancel_Click()
  188.     Unload Me
  189. End Sub
  190. Private Sub cmdok_Click()
  191.     On Error Resume Next
  192.     If Me.chkbgcolor.Value = vbChecked Then
  193.         style_background.use_color = True
  194.     Else
  195.         style_background.use_color = False
  196.     End If
  197.     If Me.chkpicture.Value = vbChecked Then
  198.         style_background.use_picture = True
  199.     Else
  200.         style_background.use_picture = False
  201.     End If
  202.     style_background.color = Me.Picturebgcolor.BackColor
  203.     style_background.picture_name = Me.txtbgpicture
  204.     style_background.repeat = Me.combrepeat.Text
  205.     style_background.attachement = Me.combattach.Text
  206.     style_background.hpos = Me.combhpos.Text
  207.     style_background.hpostype = Me.combhpostype.Text
  208.     style_background.vpos = Me.combvpos.Text
  209.     style_background.vpostype = Me.combvpostype.Text
  210.     Unload Me
  211. End Sub
  212. Private Sub cmdpicturebrowse_Click()
  213.     Me.CommonDialog1.CancelError = True
  214.     On Error GoTo ErrHandler
  215.     Me.CommonDialog1.Filter = "Pictures (*.gif;*.jpg;*.png)|*.gif;*.jpg;*.png| All (*.*) |*.*"
  216.     Me.CommonDialog1.Flags = cdlOFNFileMustExist
  217.     Me.CommonDialog1.ShowOpen
  218.     Me.txtbgpicture.Text = Me.CommonDialog1.filename
  219.     Exit Sub
  220. ErrHandler:
  221.    Exit Sub
  222. End Sub
  223. Private Sub combhpos_Click()
  224.     If Me.combhpos.Text <> "left" And Me.combhpos.Text <> "center" And Me.combhpos.Text <> "right" Then
  225.         Me.combhpostype.Enabled = True
  226.     Else
  227.         Me.combhpostype.Enabled = False
  228.     End If
  229. End Sub
  230. Private Sub combvpos_Click()
  231.     If Me.combvpos.Text <> "top" And Me.combvpos.Text <> "center" And Me.combvpos.Text <> "bottom" Then
  232.         Me.combvpostype.Enabled = True
  233.     Else
  234.         Me.combvpostype.Enabled = False
  235.     End If
  236. End Sub
  237. Private Sub Form_Load()
  238.     On Error Resume Next
  239.     If style_background.use_color Then Me.chkbgcolor.Value = vbChecked
  240.     If style_background.use_picture Then Me.chkpicture.Value = vbChecked
  241.     Me.Picturebgcolor.BackColor = style_background.color
  242.     Me.txtbgpicture = style_background.picture_name
  243.     Me.combrepeat.Text = style_background.repeat
  244.     Me.combattach.Text = style_background.attachement
  245.     Me.combhpos.Text = style_background.hpos
  246.     Me.combhpostype.Text = style_background.hpostype
  247.     Me.combvpos.Text = style_background.vpos
  248.     Me.combvpostype.Text = style_background.vpostype
  249. End Sub
  250. Private Sub Picturebgcolor_Click()
  251.    Dim tmp As Long
  252.    Me.CommonDialog1.CancelError = True
  253.    On Error GoTo ErrHandler
  254.    Me.CommonDialog1.Flags = cdlCCRGBInit
  255.    Me.CommonDialog1.ShowColor
  256.    tmp = CommonDialog1.color
  257.    Me.Picturebgcolor.BackColor = tmp
  258.    Exit Sub
  259. ErrHandler:
  260.    Exit Sub
  261. End Sub
  262.