Initial revision
[citadel.git] / wincit / prefs.frm
1 VERSION 4.00
2 Begin VB.Form Preferences 
3    Appearance      =   0  'Flat
4    BackColor       =   &H00C0C0C0&
5    BorderStyle     =   3  'Fixed Dialog
6    ClientHeight    =   4290
7    ClientLeft      =   1530
8    ClientTop       =   1800
9    ClientWidth     =   5865
10    ControlBox      =   0   'False
11    BeginProperty Font 
12       name            =   "MS Sans Serif"
13       charset         =   0
14       weight          =   700
15       size            =   8.25
16       underline       =   0   'False
17       italic          =   0   'False
18       strikethrough   =   0   'False
19    EndProperty
20    ForeColor       =   &H80000008&
21    Height          =   4695
22    Left            =   1470
23    LinkTopic       =   "Form1"
24    MaxButton       =   0   'False
25    MDIChild        =   -1  'True
26    MinButton       =   0   'False
27    ScaleHeight     =   4290
28    ScaleWidth      =   5865
29    Top             =   1455
30    Width           =   5985
31    Begin Threed.SSFrame Frame3D1 
32       Height          =   855
33       Left            =   120
34       TabIndex        =   13
35       Top             =   2880
36       Width           =   5655
37       _Version        =   65536
38       _ExtentX        =   9975
39       _ExtentY        =   1508
40       _StockProps     =   14
41       Caption         =   "Misc Preferences"
42       ForeColor       =   0
43       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
44          name            =   "MS Sans Serif"
45          charset         =   0
46          weight          =   400
47          size            =   8.25
48          underline       =   0   'False
49          italic          =   0   'False
50          strikethrough   =   0   'False
51       EndProperty
52       Begin VB.CheckBox MailNotice 
53          Appearance      =   0  'Flat
54          BackColor       =   &H00C0C0C0&
55          Caption         =   "Display message at login if you have new private mail"
56          BeginProperty Font 
57             name            =   "MS Sans Serif"
58             charset         =   0
59             weight          =   400
60             size            =   8.25
61             underline       =   0   'False
62             italic          =   0   'False
63             strikethrough   =   0   'False
64          EndProperty
65          ForeColor       =   &H80000008&
66          Height          =   252
67          Left            =   120
68          TabIndex        =   14
69          Top             =   360
70          Width           =   5412
71       End
72    End
73    Begin VB.CommandButton Save 
74       Appearance      =   0  'Flat
75       BackColor       =   &H80000005&
76       Caption         =   "Save"
77       Height          =   372
78       Left            =   3480
79       TabIndex        =   10
80       Top             =   3840
81       Width           =   1092
82    End
83    Begin VB.CommandButton cancel_button 
84       Appearance      =   0  'Flat
85       BackColor       =   &H80000005&
86       Cancel          =   -1  'True
87       Caption         =   "Cancel"
88       Height          =   372
89       Left            =   4680
90       TabIndex        =   9
91       Top             =   3840
92       Width           =   1092
93    End
94    Begin Threed.SSFrame Frame3D2 
95       Height          =   1455
96       Left            =   120
97       TabIndex        =   0
98       Top             =   0
99       Width           =   5655
100       _Version        =   65536
101       _ExtentX        =   9975
102       _ExtentY        =   2566
103       _StockProps     =   14
104       Caption         =   "Default action when a room is double-clicked"
105       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
106          name            =   "MS Sans Serif"
107          charset         =   0
108          weight          =   400
109          size            =   8.25
110          underline       =   0   'False
111          italic          =   0   'False
112          strikethrough   =   0   'False
113       EndProperty
114       Begin VB.OptionButton DefaultIsAbandon 
115          Appearance      =   0  'Flat
116          BackColor       =   &H00C0C0C0&
117          Caption         =   "<A>bandon (set last-read pointer where you stopped reading)"
118          BeginProperty Font 
119             name            =   "MS Sans Serif"
120             charset         =   0
121             weight          =   400
122             size            =   8.25
123             underline       =   0   'False
124             italic          =   0   'False
125             strikethrough   =   0   'False
126          EndProperty
127          ForeColor       =   &H80000008&
128          Height          =   252
129          Left            =   120
130          TabIndex        =   3
131          Top             =   1080
132          Width           =   5412
133       End
134       Begin VB.OptionButton DefaultIsSkip 
135          Appearance      =   0  'Flat
136          BackColor       =   &H00C0C0C0&
137          Caption         =   "<S>kip (leave all messages marked unread)"
138          BeginProperty Font 
139             name            =   "MS Sans Serif"
140             charset         =   0
141             weight          =   400
142             size            =   8.25
143             underline       =   0   'False
144             italic          =   0   'False
145             strikethrough   =   0   'False
146          EndProperty
147          ForeColor       =   &H80000008&
148          Height          =   255
149          Left            =   120
150          TabIndex        =   2
151          Top             =   720
152          Width           =   5055
153       End
154       Begin VB.OptionButton DefaultIsGoto 
155          Appearance      =   0  'Flat
156          BackColor       =   &H00C0C0C0&
157          Caption         =   "<G>oto (mark all messages as read)"
158          BeginProperty Font 
159             name            =   "MS Sans Serif"
160             charset         =   0
161             weight          =   400
162             size            =   8.25
163             underline       =   0   'False
164             italic          =   0   'False
165             strikethrough   =   0   'False
166          EndProperty
167          ForeColor       =   &H80000008&
168          Height          =   252
169          Left            =   120
170          TabIndex        =   1
171          Top             =   360
172          Width           =   4452
173       End
174    End
175    Begin Threed.SSFrame Frame3D3 
176       Height          =   1335
177       Left            =   120
178       TabIndex        =   4
179       Top             =   1440
180       Width           =   5655
181       _Version        =   65536
182       _ExtentX        =   9975
183       _ExtentY        =   2355
184       _StockProps     =   14
185       Caption         =   "Font preferences"
186       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
187          name            =   "MS Sans Serif"
188          charset         =   0
189          weight          =   400
190          size            =   8.25
191          underline       =   0   'False
192          italic          =   0   'False
193          strikethrough   =   0   'False
194       EndProperty
195       Begin VB.CommandButton ChangeFixedFont 
196          Appearance      =   0  'Flat
197          BackColor       =   &H80000005&
198          Caption         =   "Change"
199          Height          =   375
200          Left            =   4680
201          TabIndex        =   8
202          Top             =   840
203          Width           =   855
204       End
205       Begin VB.CommandButton ChangeVariFont 
206          Appearance      =   0  'Flat
207          BackColor       =   &H80000005&
208          Caption         =   "Change"
209          Height          =   375
210          Left            =   4680
211          TabIndex        =   7
212          Top             =   360
213          Width           =   855
214       End
215       Begin VB.Label FixedFontName 
216          Alignment       =   2  'Center
217          Appearance      =   0  'Flat
218          BackColor       =   &H80000005&
219          BackStyle       =   0  'Transparent
220          Caption         =   "Fixed Font Name"
221          BeginProperty Font 
222             name            =   "MS Sans Serif"
223             charset         =   0
224             weight          =   700
225             size            =   12
226             underline       =   0   'False
227             italic          =   0   'False
228             strikethrough   =   0   'False
229          EndProperty
230          ForeColor       =   &H80000008&
231          Height          =   375
232          Left            =   1560
233          TabIndex        =   11
234          Top             =   915
235          Width           =   3135
236       End
237       Begin VB.Label VariFontName 
238          Alignment       =   2  'Center
239          Appearance      =   0  'Flat
240          BackColor       =   &H80000005&
241          BackStyle       =   0  'Transparent
242          Caption         =   "Variable Font Name"
243          BeginProperty Font 
244             name            =   "MS Sans Serif"
245             charset         =   0
246             weight          =   700
247             size            =   12
248             underline       =   0   'False
249             italic          =   0   'False
250             strikethrough   =   0   'False
251          EndProperty
252          ForeColor       =   &H80000008&
253          Height          =   375
254          Left            =   1560
255          TabIndex        =   12
256          Top             =   435
257          Width           =   3135
258       End
259       Begin VB.Label Label2 
260          Alignment       =   1  'Right Justify
261          Appearance      =   0  'Flat
262          AutoSize        =   -1  'True
263          BackColor       =   &H00C0C0C0&
264          Caption         =   "Fixed width font:"
265          BeginProperty Font 
266             name            =   "MS Sans Serif"
267             charset         =   0
268             weight          =   400
269             size            =   8.25
270             underline       =   0   'False
271             italic          =   0   'False
272             strikethrough   =   0   'False
273          EndProperty
274          ForeColor       =   &H80000008&
275          Height          =   195
276          Left            =   120
277          TabIndex        =   6
278          Top             =   960
279          Width           =   1155
280       End
281       Begin VB.Label Label1 
282          Alignment       =   1  'Right Justify
283          Appearance      =   0  'Flat
284          AutoSize        =   -1  'True
285          BackColor       =   &H00C0C0C0&
286          Caption         =   "Variable width font:"
287          BeginProperty Font 
288             name            =   "MS Sans Serif"
289             charset         =   0
290             weight          =   400
291             size            =   8.25
292             underline       =   0   'False
293             italic          =   0   'False
294             strikethrough   =   0   'False
295          EndProperty
296          ForeColor       =   &H80000008&
297          Height          =   195
298          Left            =   120
299          TabIndex        =   5
300          Top             =   480
301          Width           =   1350
302       End
303    End
304    Begin MSComDlg.CommonDialog CMDialog1 
305       Left            =   120
306       Top             =   3840
307       _Version        =   65536
308       _ExtentX        =   847
309       _ExtentY        =   847
310       _StockProps     =   0
311       DialogTitle     =   "Change Font"
312       Max             =   32767
313    End
314 End
315 Attribute VB_Name = "Preferences"
316 Attribute VB_Creatable = False
317 Attribute VB_Exposed = False
318 Dim varifontsize
319
320 Private Sub cancel_button_Click()
321
322     Load SelectBBS
323     Unload Preferences
324
325 End Sub
326
327 Private Sub ChangeFixedFont_Click()
328     
329     On Error Resume Next
330     CMDialog1.min = 0
331     CMDialog1.Max = 32767
332     CMDialog1.DialogTitle = "Font for Fixed-format messages"
333     CMDialog1.Flags = &H4001&
334     CMDialog1.FontName = fixedfontname
335     CMDialog1.Action = 4
336     If Err <> 0 Then
337         MsgBox "Can't open font dialog", 48
338         Return
339         End If
340     fixedfontname.FontName = CMDialog1.FontName
341     fixedfontname.Caption = fixedfontname.FontName
342
343 End Sub
344
345 Private Sub ChangeVariFont_Click()
346     
347     On Error Resume Next
348     CMDialog1.min = 0
349     CMDialog1.Max = 32767
350     CMDialog1.DialogTitle = "Font for vari-format messages"
351     CMDialog1.Flags = &H1&
352     CMDialog1.FontName = varifontname.FontName
353     CMDialog1.FontSize = varifontsize
354     CMDialog1.Action = 4
355     If Err <> 0 Then
356         MsgBox "Can't open font dialog", 48
357         Return
358         End If
359     varifontname.FontName = CMDialog1.FontName
360     varifontsize = CMDialog1.FontSize
361     varifontname.Caption = varifontname.FontName + " " + Str$(varifontsize)
362 End Sub
363
364 Private Sub Form_Load()
365
366     On Error Resume Next
367     
368     varifontname.FontName = GetPrivateProfileVBString("Preferences", "VariFontName", "MS Sans Serif", "WINCIT.INI")
369     varifontsize = GetPrivateProfileInt("Preferences", "VariFontSize", 10, "WINCIT.INI")
370     varifontname.FontBold = False
371     varifontname.FontItalic = False
372     varifontname.Caption = varifontname.FontName + " " + Str$(varifontsize)
373
374     fixedfontname.FontName = GetPrivateProfileVBString("Preferences", "FixedFontName", "Courier New", "WINCIT.INI")
375     fixedfontname.FontBold = False
376     fixedfontname.FontItalic = False
377     fixedfontname.Caption = fixedfontname.FontName
378
379     a$ = GetPrivateProfileVBString("Preferences", "DoubleClickAction", "GOTO", "WINCIT.INI")
380     DefaultIsGoto.Value = True
381     If a$ = "SKIP" Then DefaultIsSkip.Value = True
382     If a$ = "ABANDON" Then DefaultIsAbandon.Value = True
383
384     b% = GetPrivateProfileInt("Preferences", "MailNotice", 1, "WINCIT.INI")
385     If (b% > 0) Then
386         MailNotice.Value = 1
387     Else
388         MailNotice.Value = 0
389         End If
390
391 End Sub
392
393 Private Sub Save_Click()
394
395     a% = WritePrivateProfileString("Preferences", "VariFontName", varifontname.FontName, "WINCIT.INI")
396     a% = WritePrivateProfileString("Preferences", "VariFontSize", Str$(varifontsize), "WINCIT.INI")
397     
398     a% = WritePrivateProfileString("Preferences", "FixedFontName", fixedfontname.FontName, "WINCIT.INI")
399     
400     If DefaultIsGoto.Value = True Then a% = WritePrivateProfileString("Preferences", "DoubleClickAction", "GOTO", "WINCIT.INI")
401     If DefaultIsSkip.Value = True Then a% = WritePrivateProfileString("Preferences", "DoubleClickAction", "SKIP", "WINCIT.INI")
402     If DefaultIsAbandon.Value = True Then a% = WritePrivateProfileString("Preferences", "DoubleClickAction", "ABANDON", "WINCIT.INI")
403
404     If MailNotice.Value = 1 Then
405         a% = WritePrivateProfileString("Preferences", "MailNotice", "1", "WINCIT.INI")
406     Else
407         a% = WritePrivateProfileString("Preferences", "MailNotice", "0", "WINCIT.INI")
408         End If
409
410     Load SelectBBS
411     Unload Preferences
412
413 End Sub
414