home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD14474232001.psc / VBSnipletKeeper / frmOptions.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-01-31  |  8.3 KB  |  260 lines

  1. VERSION 5.00
  2. Begin VB.Form frmOptions 
  3.    BackColor       =   &H00C0C0C0&
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Project Options......"
  6.    ClientHeight    =   3195
  7.    ClientLeft      =   45
  8.    ClientTop       =   285
  9.    ClientWidth     =   6735
  10.    LinkTopic       =   "Form2"
  11.    MaxButton       =   0   'False
  12.    MinButton       =   0   'False
  13.    ScaleHeight     =   3195
  14.    ScaleWidth      =   6735
  15.    ShowInTaskbar   =   0   'False
  16.    StartUpPosition =   2  'CenterScreen
  17.    Begin VB.Frame Frame2 
  18.       Caption         =   "Editor"
  19.       Height          =   2460
  20.       Left            =   60
  21.       TabIndex        =   2
  22.       Top             =   90
  23.       Width           =   6585
  24.       Begin VB.PictureBox BCol 
  25.          BackColor       =   &H00FFFFFF&
  26.          Height          =   285
  27.          Left            =   4470
  28.          ScaleHeight     =   225
  29.          ScaleWidth      =   480
  30.          TabIndex        =   15
  31.          Top             =   1755
  32.          Width           =   540
  33.       End
  34.       Begin VB.CommandButton Command3 
  35.          Height          =   375
  36.          Left            =   4425
  37.          TabIndex        =   14
  38.          Top             =   1710
  39.          Width           =   1020
  40.       End
  41.       Begin VB.PictureBox FCOL 
  42.          BackColor       =   &H00000000&
  43.          Height          =   285
  44.          Left            =   3315
  45.          ScaleHeight     =   225
  46.          ScaleWidth      =   480
  47.          TabIndex        =   12
  48.          Top             =   1755
  49.          Width           =   540
  50.       End
  51.       Begin VB.CommandButton Command2 
  52.          Height          =   375
  53.          Left            =   3270
  54.          TabIndex        =   11
  55.          Top             =   1710
  56.          Width           =   1020
  57.       End
  58.       Begin VB.PictureBox Picture1 
  59.          BackColor       =   &H00FFFFFF&
  60.          Height          =   690
  61.          Left            =   3330
  62.          ScaleHeight     =   630
  63.          ScaleWidth      =   2115
  64.          TabIndex        =   8
  65.          Top             =   660
  66.          Width           =   2175
  67.          Begin VB.Label lblStyle 
  68.             AutoSize        =   -1  'True
  69.             BackStyle       =   0  'Transparent
  70.             Caption         =   "ABCDEFabcdef"
  71.             BeginProperty Font 
  72.                Name            =   "Courier New"
  73.                Size            =   9.75
  74.                Charset         =   0
  75.                Weight          =   400
  76.                Underline       =   0   'False
  77.                Italic          =   0   'False
  78.                Strikethrough   =   0   'False
  79.             EndProperty
  80.             ForeColor       =   &H00404040&
  81.             Height          =   240
  82.             Left            =   60
  83.             TabIndex        =   9
  84.             Top             =   195
  85.             Width           =   1440
  86.          End
  87.       End
  88.       Begin VB.ListBox lstSize 
  89.          Height          =   1620
  90.          Left            =   2325
  91.          TabIndex        =   6
  92.          Top             =   660
  93.          Width           =   795
  94.       End
  95.       Begin VB.ListBox lstFont 
  96.          Height          =   1620
  97.          Left            =   105
  98.          TabIndex        =   5
  99.          Top             =   660
  100.          Width           =   2160
  101.       End
  102.       Begin VB.Label Label5 
  103.          AutoSize        =   -1  'True
  104.          Caption         =   "Back-Colour"
  105.          BeginProperty Font 
  106.             Name            =   "Arial"
  107.             Size            =   9.75
  108.             Charset         =   0
  109.             Weight          =   400
  110.             Underline       =   0   'False
  111.             Italic          =   0   'False
  112.             Strikethrough   =   0   'False
  113.          EndProperty
  114.          ForeColor       =   &H00FF0000&
  115.          Height          =   240
  116.          Left            =   4395
  117.          TabIndex        =   13
  118.          Top             =   1410
  119.          Width           =   1065
  120.       End
  121.       Begin VB.Label Label3 
  122.          AutoSize        =   -1  'True
  123.          Caption         =   "Size"
  124.          BeginProperty Font 
  125.             Name            =   "Courier New"
  126.             Size            =   9.75
  127.             Charset         =   0
  128.             Weight          =   400
  129.             Underline       =   0   'False
  130.             Italic          =   0   'False
  131.             Strikethrough   =   0   'False
  132.          EndProperty
  133.          ForeColor       =   &H00FF0000&
  134.          Height          =   240
  135.          Left            =   2460
  136.          TabIndex        =   10
  137.          Top             =   390
  138.          Width           =   480
  139.       End
  140.       Begin VB.Label Label4 
  141.          AutoSize        =   -1  'True
  142.          Caption         =   "Sample"
  143.          Height          =   195
  144.          Left            =   4110
  145.          TabIndex        =   7
  146.          Top             =   390
  147.          Width           =   525
  148.       End
  149.       Begin VB.Label Label2 
  150.          AutoSize        =   -1  'True
  151.          Caption         =   "Fore-Colour"
  152.          BeginProperty Font 
  153.             Name            =   "Arial"
  154.             Size            =   9.75
  155.             Charset         =   0
  156.             Weight          =   400
  157.             Underline       =   0   'False
  158.             Italic          =   0   'False
  159.             Strikethrough   =   0   'False
  160.          EndProperty
  161.          ForeColor       =   &H00FF0000&
  162.          Height          =   240
  163.          Left            =   3300
  164.          TabIndex        =   4
  165.          Top             =   1410
  166.          Width           =   1005
  167.       End
  168.       Begin VB.Label Label1 
  169.          AutoSize        =   -1  'True
  170.          Caption         =   "Font"
  171.          BeginProperty Font 
  172.             Name            =   "Courier New"
  173.             Size            =   9.75
  174.             Charset         =   0
  175.             Weight          =   400
  176.             Underline       =   0   'False
  177.             Italic          =   0   'False
  178.             Strikethrough   =   0   'False
  179.          EndProperty
  180.          ForeColor       =   &H00FF0000&
  181.          Height          =   240
  182.          Left            =   105
  183.          TabIndex        =   3
  184.          Top             =   390
  185.          Width           =   480
  186.       End
  187.    End
  188.    Begin VB.CommandButton cmdCan 
  189.       Caption         =   "Cancel"
  190.       Height          =   375
  191.       Left            =   1275
  192.       TabIndex        =   1
  193.       Top             =   2685
  194.       Width           =   1155
  195.    End
  196.    Begin VB.CommandButton Command1 
  197.       Caption         =   "&Ok"
  198.       Height          =   375
  199.       Left            =   75
  200.       TabIndex        =   0
  201.       Top             =   2685
  202.       Width           =   1155
  203.    End
  204. Attribute VB_Name = "frmOptions"
  205. Attribute VB_GlobalNameSpace = False
  206. Attribute VB_Creatable = False
  207. Attribute VB_PredeclaredId = True
  208. Attribute VB_Exposed = False
  209. Private Sub cmdCan_Click()
  210.     Unload frmOptions
  211.     Form1.Show
  212. End Sub
  213. Private Sub Command1_Click()
  214.     Config.Font_Name = lstFont.Text
  215.     Config.Font_Size = lstSize.Text
  216.     Config.Fore_Colour = FCOL.BackColor
  217.     Config.Back_Colour = BCol.BackColor
  218.     WriteINIChanges
  219.     Form1.Show
  220.     Unload frmOptions
  221. End Sub
  222. Private Sub Command2_Click()
  223. On Error Resume Next
  224.     FCOL.BackColor = ShowColor(hwnd)
  225.     lblStyle.ForeColor = FCOL.BackColor
  226.     Config.Fore_Colour = FCOL.BackColor
  227.     If Err Then Err.Clear
  228. End Sub
  229. Private Sub Command3_Click()
  230. On Error Resume Next
  231.     BCol.BackColor = ShowColor(hwnd)
  232.     Picture1.BackColor = BCol.BackColor
  233.     Config.Back_Colour = BCol.BackColor
  234.     If Err Then Err.Clear
  235. End Sub
  236. Private Sub Form_Load()
  237. Dim IFont As Integer
  238.     For IFont = 1 To Screen.FontCount - 1
  239.         lstFont.AddItem Screen.Fonts(IFont)
  240.     Next
  241.     lstSize.AddItem "8"
  242.     lstSize.AddItem "9"
  243.     lstSize.AddItem "10"
  244.     lstSize.AddItem "12"
  245.     lstSize.AddItem "14"
  246.     lstSize.AddItem "16"
  247.     lstSize.AddItem "18"
  248.     lstSize.AddItem "24"
  249.     IFont = 0
  250. End Sub
  251. Private Sub lstFont_Click()
  252.     lblStyle.Font = lstFont.Text
  253.     Config.Font_Name = lstFont.Text
  254. End Sub
  255. Private Sub lstSize_Click()
  256.     lblStyle.FontSize = Val(lstSize.Text)
  257.     lblStyle.Top = Picture1.Height / 2 - 150
  258.     Config.Font_Size = lstSize.Text
  259. End Sub
  260.