home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / digclk12 / options.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-05-02  |  11.1 KB  |  329 lines

  1. VERSION 2.00
  2. Begin Form frmoptions 
  3.    BorderStyle     =   1  'Fixed Single
  4.    ClientHeight    =   4455
  5.    ClientLeft      =   2115
  6.    ClientTop       =   1770
  7.    ClientWidth     =   4695
  8.    ControlBox      =   0   'False
  9.    Height          =   4860
  10.    Left            =   2055
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   4455
  15.    ScaleWidth      =   4695
  16.    Top             =   1425
  17.    Width           =   4815
  18.    Begin SSPanel Panel3D1 
  19.       BackColor       =   &H00C0C0C0&
  20.       BevelInner      =   1  'Inset
  21.       BevelWidth      =   2
  22.       Font3D          =   3  'Inset w/light shading
  23.       ForeColor       =   &H00800000&
  24.       Height          =   4455
  25.       Left            =   0
  26.       TabIndex        =   7
  27.       Top             =   0
  28.       Width           =   4695
  29.       Begin SSPanel Panel3D6 
  30.          BackColor       =   &H00C0C0C0&
  31.          BevelWidth      =   2
  32.          Font3D          =   3  'Inset w/light shading
  33.          ForeColor       =   &H00800000&
  34.          Height          =   1335
  35.          Left            =   2400
  36.          TabIndex        =   17
  37.          Top             =   2880
  38.          Width           =   2055
  39.          Begin CommandButton cmdOk 
  40.             Cancel          =   -1  'True
  41.             Caption         =   "E&xit"
  42.             FontBold        =   -1  'True
  43.             FontItalic      =   0   'False
  44.             FontName        =   "MS Sans Serif"
  45.             FontSize        =   9.75
  46.             FontStrikethru  =   0   'False
  47.             FontUnderline   =   0   'False
  48.             Height          =   495
  49.             Index           =   1
  50.             Left            =   240
  51.             TabIndex        =   18
  52.             Top             =   690
  53.             Width           =   1575
  54.          End
  55.          Begin CommandButton cmdOk 
  56.             Caption         =   "&Ok"
  57.             FontBold        =   -1  'True
  58.             FontItalic      =   0   'False
  59.             FontName        =   "MS Sans Serif"
  60.             FontSize        =   9.75
  61.             FontStrikethru  =   0   'False
  62.             FontUnderline   =   0   'False
  63.             Height          =   495
  64.             Index           =   0
  65.             Left            =   240
  66.             TabIndex        =   6
  67.             Top             =   120
  68.             Width           =   1575
  69.          End
  70.       End
  71.       Begin SSPanel Panel3D5 
  72.          BackColor       =   &H00C0C0C0&
  73.          BevelWidth      =   2
  74.          Font3D          =   3  'Inset w/light shading
  75.          ForeColor       =   &H00800000&
  76.          Height          =   1335
  77.          Left            =   240
  78.          TabIndex        =   16
  79.          Top             =   2880
  80.          Width           =   2055
  81.          Begin SSCheck chkSeconds 
  82.             Caption         =   "Show Seconds"
  83.             Font3D          =   0  'None
  84.             ForeColor       =   &H00000000&
  85.             Height          =   255
  86.             Left            =   150
  87.             TabIndex        =   5
  88.             Top             =   720
  89.             Width           =   1695
  90.          End
  91.          Begin SSCheck chkOnTop 
  92.             Caption         =   "On Top"
  93.             Font3D          =   0  'None
  94.             ForeColor       =   &H00000000&
  95.             Height          =   255
  96.             Left            =   120
  97.             TabIndex        =   4
  98.             Top             =   240
  99.             Width           =   1575
  100.          End
  101.       End
  102.       Begin SSPanel Panel3D4 
  103.          BackColor       =   &H00C0C0C0&
  104.          BevelWidth      =   2
  105.          Font3D          =   3  'Inset w/light shading
  106.          ForeColor       =   &H00800000&
  107.          Height          =   855
  108.          Left            =   2400
  109.          TabIndex        =   15
  110.          Top             =   1920
  111.          Width           =   2055
  112.          Begin SSOption optColor 
  113.             Caption         =   "Red Clock Face"
  114.             Font3D          =   0  'None
  115.             ForeColor       =   &H00000000&
  116.             Height          =   255
  117.             Index           =   0
  118.             Left            =   120
  119.             TabIndex        =   2
  120.             Top             =   120
  121.             Width           =   1815
  122.          End
  123.          Begin SSOption optColor 
  124.             Caption         =   "Green Clock Face"
  125.             Font3D          =   0  'None
  126.             ForeColor       =   &H00000000&
  127.             Height          =   255
  128.             Index           =   1
  129.             Left            =   120
  130.             TabIndex        =   3
  131.             Top             =   480
  132.             Width           =   1815
  133.          End
  134.       End
  135.       Begin SSPanel Panel3D3 
  136.          BackColor       =   &H00C0C0C0&
  137.          BevelWidth      =   2
  138.          Font3D          =   3  'Inset w/light shading
  139.          ForeColor       =   &H00800000&
  140.          Height          =   855
  141.          Left            =   240
  142.          TabIndex        =   14
  143.          Top             =   1920
  144.          Width           =   2055
  145.          Begin SSOption optTimeFormat 
  146.             Caption         =   "12 - Hour"
  147.             Font3D          =   0  'None
  148.             ForeColor       =   &H00000000&
  149.             Height          =   255
  150.             Index           =   0
  151.             Left            =   120
  152.             TabIndex        =   0
  153.             Top             =   120
  154.             Width           =   1335
  155.          End
  156.          Begin SSOption optTimeFormat 
  157.             Caption         =   "24 - Hour"
  158.             Font3D          =   0  'None
  159.             ForeColor       =   &H00000000&
  160.             Height          =   255
  161.             Index           =   1
  162.             Left            =   120
  163.             TabIndex        =   1
  164.             Top             =   480
  165.             Width           =   1335
  166.          End
  167.       End
  168.       Begin SSPanel Panel3D2 
  169.          BackColor       =   &H00C0C0C0&
  170.          BevelOuter      =   1  'Inset
  171.          BevelWidth      =   2
  172.          Font3D          =   3  'Inset w/light shading
  173.          ForeColor       =   &H00800000&
  174.          Height          =   1455
  175.          Left            =   600
  176.          TabIndex        =   8
  177.          Top             =   360
  178.          Width           =   3495
  179.          Begin Label Label5 
  180.             Alignment       =   2  'Center
  181.             BackStyle       =   0  'Transparent
  182.             Caption         =   "dbrodie@nbnet.nb.ca"
  183.             FontBold        =   -1  'True
  184.             FontItalic      =   0   'False
  185.             FontName        =   "MS Sans Serif"
  186.             FontSize        =   12
  187.             FontStrikethru  =   0   'False
  188.             FontUnderline   =   0   'False
  189.             ForeColor       =   &H00FF0000&
  190.             Height          =   315
  191.             Left            =   120
  192.             TabIndex        =   10
  193.             Top             =   720
  194.             Width           =   3255
  195.          End
  196.          Begin Label Label4 
  197.             Alignment       =   1  'Right Justify
  198.             BackStyle       =   0  'Transparent
  199.             Caption         =   "September 28, 1994"
  200.             FontBold        =   0   'False
  201.             FontItalic      =   0   'False
  202.             FontName        =   "MS Sans Serif"
  203.             FontSize        =   9.75
  204.             FontStrikethru  =   0   'False
  205.             FontUnderline   =   0   'False
  206.             Height          =   255
  207.             Left            =   1680
  208.             TabIndex        =   11
  209.             Top             =   1200
  210.             Width           =   1695
  211.          End
  212.          Begin Label Label3 
  213.             BackStyle       =   0  'Transparent
  214.             Caption         =   "Version: 1.2"
  215.             FontBold        =   0   'False
  216.             FontItalic      =   0   'False
  217.             FontName        =   "MS Sans Serif"
  218.             FontSize        =   9.75
  219.             FontStrikethru  =   0   'False
  220.             FontUnderline   =   0   'False
  221.             Height          =   255
  222.             Left            =   120
  223.             TabIndex        =   12
  224.             Top             =   1200
  225.             Width           =   1095
  226.          End
  227.          Begin Label Label2 
  228.             Alignment       =   2  'Center
  229.             BackStyle       =   0  'Transparent
  230.             Caption         =   "By:  Damon Brodie"
  231.             FontBold        =   -1  'True
  232.             FontItalic      =   0   'False
  233.             FontName        =   "MS Sans Serif"
  234.             FontSize        =   12
  235.             FontStrikethru  =   0   'False
  236.             FontUnderline   =   0   'False
  237.             ForeColor       =   &H00FF0000&
  238.             Height          =   255
  239.             Left            =   120
  240.             TabIndex        =   13
  241.             Top             =   480
  242.             Width           =   3255
  243.          End
  244.          Begin Label Label1 
  245.             Alignment       =   2  'Center
  246.             BackStyle       =   0  'Transparent
  247.             Caption         =   "DigiClock"
  248.             FontBold        =   -1  'True
  249.             FontItalic      =   0   'False
  250.             FontName        =   "MS Sans Serif"
  251.             FontSize        =   12
  252.             FontStrikethru  =   0   'False
  253.             FontUnderline   =   0   'False
  254.             ForeColor       =   &H00FF0000&
  255.             Height          =   375
  256.             Left            =   120
  257.             TabIndex        =   9
  258.             Top             =   120
  259.             Width           =   3255
  260.          End
  261.       End
  262.    End
  263. Option Explicit
  264. Sub cmdExit_Click ()
  265. Unload Me
  266. Unload frmClock
  267. End Sub
  268. Sub cmdOk_Click (Index As Integer)
  269. Dim Success%
  270. Dim Temp
  271. Dim TempString As String
  272. If chkOnTop.Value Then
  273.    Success% = SetWindowPos(frmClock.hWnd, HWND_TOPMOST, 0, 0, 0, 0, FLAGS)
  274.    OnTop = 1
  275.    Success% = SetWindowPos(frmClock.hWnd, HWND_NOTOPMOST, 0, 0, 0, 0, FLAGS)
  276.    OnTop = 0
  277. End If
  278. If optColor(0).Value Then
  279.    frmClock.picNumbers.Picture = frmClock.imgRed.Picture
  280.    ClockColor = 0
  281.    frmClock.picNumbers.Picture = frmClock.imgGreen.Picture
  282.    ClockColor = 1
  283. End If
  284. If optTimeFormat(0).Value Then
  285.    TimeFormat = 12
  286.    TimeFormat = 24
  287. End If
  288. If chkSeconds.Value Then
  289.    frmClock.picClock.Width = 2505
  290.    frmClock.pnlClock.Width = 2730
  291.    frmClock.Width = 2765
  292.    ' Turn on the colons.
  293.    frmClock.imgNum(2).Picture = frmClock.picNumbers.GraphicCell(10)
  294.    frmClock.imgNum(5).Picture = frmClock.picNumbers.GraphicCell(10)
  295.    SecondsOn = 1
  296.    frmClock.picClock.Width = 1560
  297.    frmClock.pnlClock.Width = 1770
  298.    frmClock.Width = 1800
  299.    SecondsOn = 0
  300. End If
  301. OldTime = ""
  302. If Index = 0 Then
  303.    Me.Hide
  304.    Unload Me
  305.    Unload frmClock
  306. End If
  307. End Sub
  308. Sub Form_Load ()
  309. CenterForm frmOptions
  310. If OnTop Then
  311.    chkOnTop.Value = True
  312. End If
  313. If ClockColor = 0 Then
  314.    optColor(0).Value = 1
  315.    optColor(1).Value = 1
  316. End If
  317. If TimeFormat = 12 Then
  318.    optTimeFormat(0).Value = 1
  319.    optTimeFormat(1).Value = 1
  320. End If
  321. If SecondsOn Then
  322.    chkSeconds.Value = 1
  323.    chkSeconds.Value = 0
  324. End If
  325. End Sub
  326. Sub optColor_Click (Index As Integer, Value As Integer)
  327. ClockColor = Index
  328. End Sub
  329.