]> code.citadel.org Git - citadel.git/blob - wincit/entmsg.frm
* Reference count adjustments are now deferred by queuing
[citadel.git] / wincit / entmsg.frm
1 VERSION 4.00
2 Begin VB.Form EnterMessage 
3    Appearance      =   0  'Flat
4    BackColor       =   &H00C0C0C0&
5    BorderStyle     =   0  'None
6    ClientHeight    =   6915
7    ClientLeft      =   1410
8    ClientTop       =   2880
9    ClientWidth     =   9600
10    ControlBox      =   0   'False
11    BeginProperty Font 
12       name            =   "MS Serif"
13       charset         =   0
14       weight          =   700
15       size            =   6.75
16       underline       =   0   'False
17       italic          =   0   'False
18       strikethrough   =   0   'False
19    EndProperty
20    ForeColor       =   &H80000008&
21    Height          =   7320
22    Left            =   1350
23    LinkTopic       =   "Form1"
24    MaxButton       =   0   'False
25    MDIChild        =   -1  'True
26    MinButton       =   0   'False
27    ScaleHeight     =   6915
28    ScaleWidth      =   9600
29    Top             =   2535
30    Width           =   9720
31    Begin VB.CommandButton hold_button 
32       Appearance      =   0  'Flat
33       BackColor       =   &H80000005&
34       Caption         =   "&Hold"
35       BeginProperty Font 
36          name            =   "MS Sans Serif"
37          charset         =   0
38          weight          =   700
39          size            =   8.25
40          underline       =   0   'False
41          italic          =   0   'False
42          strikethrough   =   0   'False
43       EndProperty
44       Height          =   372
45       Left            =   6000
46       TabIndex        =   15
47       Top             =   6480
48       Width           =   1092
49    End
50    Begin VB.CommandButton ShowFmt 
51       Appearance      =   0  'Flat
52       BackColor       =   &H80000005&
53       Caption         =   "Show &Formatted"
54       BeginProperty Font 
55          name            =   "MS Sans Serif"
56          charset         =   0
57          weight          =   700
58          size            =   8.25
59          underline       =   0   'False
60          italic          =   0   'False
61          strikethrough   =   0   'False
62       EndProperty
63       Height          =   372
64       Left            =   2640
65       TabIndex        =   14
66       Top             =   6480
67       Width           =   1572
68    End
69    Begin Threed.SSPanel CurrPos 
70       Height          =   375
71       Left            =   120
72       TabIndex        =   13
73       Top             =   6480
74       Width           =   1695
75       _Version        =   65536
76       _ExtentX        =   2990
77       _ExtentY        =   661
78       _StockProps     =   15
79       Caption         =   "0 / 0"
80       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
81          name            =   "MS Sans Serif"
82          charset         =   0
83          weight          =   700
84          size            =   8.25
85          underline       =   0   'False
86          italic          =   0   'False
87          strikethrough   =   0   'False
88       EndProperty
89       BevelWidth      =   3
90       BorderWidth     =   4
91       BevelOuter      =   1
92    End
93    Begin VB.CommandButton InsQuote 
94       Appearance      =   0  'Flat
95       BackColor       =   &H80000005&
96       Caption         =   "Insert &Quote"
97       BeginProperty Font 
98          name            =   "MS Sans Serif"
99          charset         =   0
100          weight          =   700
101          size            =   8.25
102          underline       =   0   'False
103          italic          =   0   'False
104          strikethrough   =   0   'False
105       EndProperty
106       Height          =   372
107       Left            =   4320
108       TabIndex        =   12
109       Top             =   6480
110       Width           =   1572
111    End
112    Begin Threed.SSPanel message_panel 
113       Height          =   5535
114       Left            =   0
115       TabIndex        =   11
116       Top             =   840
117       Width           =   10455
118       _Version        =   65536
119       _ExtentX        =   18441
120       _ExtentY        =   9763
121       _StockProps     =   15
122       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
123          name            =   "MS Sans Serif"
124          charset         =   0
125          weight          =   700
126          size            =   8.25
127          underline       =   0   'False
128          italic          =   0   'False
129          strikethrough   =   0   'False
130       EndProperty
131       BevelWidth      =   9
132       BorderWidth     =   0
133       BevelOuter      =   1
134       Begin VB.TextBox message_text 
135          Appearance      =   0  'Flat
136          BackColor       =   &H00C0C0C0&
137          BorderStyle     =   0  'None
138          BeginProperty Font 
139             name            =   "Courier New"
140             charset         =   0
141             weight          =   400
142             size            =   12
143             underline       =   0   'False
144             italic          =   0   'False
145             strikethrough   =   0   'False
146          EndProperty
147          Height          =   5295
148          Left            =   120
149          MultiLine       =   -1  'True
150          ScrollBars      =   2  'Vertical
151          TabIndex        =   1
152          Top             =   120
153          Width           =   10215
154       End
155    End
156    Begin VB.CommandButton save_button 
157       Appearance      =   0  'Flat
158       BackColor       =   &H80000005&
159       Caption         =   "&Save"
160       BeginProperty Font 
161          name            =   "MS Sans Serif"
162          charset         =   0
163          weight          =   700
164          size            =   8.25
165          underline       =   0   'False
166          italic          =   0   'False
167          strikethrough   =   0   'False
168       EndProperty
169       Height          =   372
170       Left            =   7200
171       TabIndex        =   10
172       Top             =   6480
173       Width           =   1092
174    End
175    Begin Threed.SSPanel room_panel 
176       Height          =   375
177       Left            =   6000
178       TabIndex        =   9
179       Top             =   420
180       Width           =   3615
181       _Version        =   65536
182       _ExtentX        =   6376
183       _ExtentY        =   661
184       _StockProps     =   15
185       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
186          name            =   "MS Sans Serif"
187          charset         =   0
188          weight          =   400
189          size            =   8.24
190          underline       =   0   'False
191          italic          =   0   'False
192          strikethrough   =   0   'False
193       EndProperty
194       BevelWidth      =   3
195       BorderWidth     =   4
196       BevelOuter      =   1
197    End
198    Begin Threed.SSPanel date_panel 
199       Height          =   375
200       Left            =   6000
201       TabIndex        =   6
202       Top             =   15
203       Width           =   3615
204       _Version        =   65536
205       _ExtentX        =   6376
206       _ExtentY        =   661
207       _StockProps     =   15
208       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
209          name            =   "MS Sans Serif"
210          charset         =   0
211          weight          =   400
212          size            =   8.24
213          underline       =   0   'False
214          italic          =   0   'False
215          strikethrough   =   0   'False
216       EndProperty
217       BevelWidth      =   3
218       BorderWidth     =   4
219       BevelOuter      =   1
220    End
221    Begin Threed.SSPanel to_panel 
222       Height          =   375
223       Left            =   480
224       TabIndex        =   5
225       Top             =   420
226       Width           =   4935
227       _Version        =   65536
228       _ExtentX        =   8705
229       _ExtentY        =   661
230       _StockProps     =   15
231       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
232          name            =   "MS Sans Serif"
233          charset         =   0
234          weight          =   400
235          size            =   8.24
236          underline       =   0   'False
237          italic          =   0   'False
238          strikethrough   =   0   'False
239       EndProperty
240       BevelWidth      =   3
241       BorderWidth     =   4
242       BevelOuter      =   1
243    End
244    Begin VB.CommandButton cancel_button 
245       Appearance      =   0  'Flat
246       BackColor       =   &H80000005&
247       Caption         =   "&Cancel"
248       BeginProperty Font 
249          name            =   "MS Sans Serif"
250          charset         =   0
251          weight          =   700
252          size            =   8.25
253          underline       =   0   'False
254          italic          =   0   'False
255          strikethrough   =   0   'False
256       EndProperty
257       Height          =   372
258       Left            =   8400
259       TabIndex        =   0
260       Top             =   6480
261       Width           =   1092
262    End
263    Begin Threed.SSPanel from_panel 
264       Height          =   375
265       Left            =   480
266       TabIndex        =   2
267       Top             =   15
268       Width           =   4935
269       _Version        =   65536
270       _ExtentX        =   8705
271       _ExtentY        =   661
272       _StockProps     =   15
273       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
274          name            =   "MS Sans Serif"
275          charset         =   0
276          weight          =   400
277          size            =   8.24
278          underline       =   0   'False
279          italic          =   0   'False
280          strikethrough   =   0   'False
281       EndProperty
282       BevelWidth      =   3
283       BorderWidth     =   4
284       BevelOuter      =   1
285    End
286    Begin VB.Label Label5 
287       Alignment       =   1  'Right Justify
288       Appearance      =   0  'Flat
289       BackColor       =   &H80000005&
290       BackStyle       =   0  'Transparent
291       Caption         =   "Room:"
292       BeginProperty Font 
293          name            =   "MS Sans Serif"
294          charset         =   0
295          weight          =   700
296          size            =   8.25
297          underline       =   0   'False
298          italic          =   0   'False
299          strikethrough   =   0   'False
300       EndProperty
301       ForeColor       =   &H80000008&
302       Height          =   255
303       Left            =   5400
304       TabIndex        =   8
305       Top             =   480
306       Width           =   615
307    End
308    Begin VB.Label Label4 
309       Alignment       =   1  'Right Justify
310       Appearance      =   0  'Flat
311       BackColor       =   &H80000005&
312       BackStyle       =   0  'Transparent
313       Caption         =   "Date:"
314       BeginProperty Font 
315          name            =   "MS Sans Serif"
316          charset         =   0
317          weight          =   700
318          size            =   8.25
319          underline       =   0   'False
320          italic          =   0   'False
321          strikethrough   =   0   'False
322       EndProperty
323       ForeColor       =   &H80000008&
324       Height          =   255
325       Left            =   5520
326       TabIndex        =   7
327       Top             =   120
328       Width           =   495
329    End
330    Begin VB.Label Label3 
331       Alignment       =   1  'Right Justify
332       Appearance      =   0  'Flat
333       BackColor       =   &H80000005&
334       BackStyle       =   0  'Transparent
335       Caption         =   "To:"
336       BeginProperty Font 
337          name            =   "MS Sans Serif"
338          charset         =   0
339          weight          =   700
340          size            =   8.25
341          underline       =   0   'False
342          italic          =   0   'False
343          strikethrough   =   0   'False
344       EndProperty
345       ForeColor       =   &H80000008&
346       Height          =   255
347       Left            =   0
348       TabIndex        =   4
349       Top             =   480
350       Width           =   495
351    End
352    Begin VB.Label Label2 
353       Alignment       =   1  'Right Justify
354       Appearance      =   0  'Flat
355       BackColor       =   &H80000005&
356       BackStyle       =   0  'Transparent
357       Caption         =   "From:"
358       BeginProperty Font 
359          name            =   "MS Sans Serif"
360          charset         =   0
361          weight          =   700
362          size            =   8.25
363          underline       =   0   'False
364          italic          =   0   'False
365          strikethrough   =   0   'False
366       EndProperty
367       ForeColor       =   &H80000008&
368       Height          =   255
369       Left            =   0
370       TabIndex        =   3
371       Top             =   120
372       Width           =   495
373    End
374 End
375 Attribute VB_Name = "EnterMessage"
376 Attribute VB_Creatable = False
377 Attribute VB_Exposed = False
378
379 Private Sub cancel_button_Click()
380     HoldMessage$ = ""
381     Unload EnterMessage
382     Load RoomPrompt
383 End Sub
384
385 Private Sub Form_Load()
386
387     message_text.FontName = GetPrivateProfileVBString("Preferences", "VariFontName", "MS Sans Serif", "WINCIT.INI")
388     message_text.FontSize = GetPrivateProfileInt("Preferences", "VariFontSize", 10, "WINCIT.INI")
389     If Len(HoldMessage$) > 0 Then
390         message_text.Text = Cit_Format(HoldMessage$)
391         End If
392     to_panel.Caption = recp$
393     room_panel.Caption = CurrRoomName$
394
395     Show
396     DoEvents
397     message_text.SetFocus
398
399 End Sub
400
401 Private Sub Form_Resize()
402     
403     EnterMessage.Left = 0
404     EnterMessage.Top = 0
405     EnterMessage.Width = MainWin.Width
406     EnterMessage.Height = MainWin.Height - 450
407     
408     cancel_button.Top = Abs(EnterMessage.Height - 520)
409     save_button.Top = Abs(EnterMessage.Height - 520)
410     InsQuote.Top = Abs(EnterMessage.Height - 520)
411     ShowFmt.Top = Abs(EnterMessage.Height - 520)
412     hold_button.Top = Abs(EnterMessage.Height - 520)
413     CurrPos.Top = Abs(EnterMessage.Height - 520)
414     message_text.Width = Abs(EnterMessage.Width - 336)
415     message_text.Height = Abs(EnterMessage.Height - 1664)
416     message_panel.Height = Abs(EnterMessage.Height - 1424)
417     message_panel.Width = Abs(EnterMessage.Width - 100)
418 End Sub
419
420 Private Sub hold_button_Click()
421     HoldMessage$ = message_text.Text
422     Unload EnterMessage
423     Load RoomPrompt
424 End Sub
425
426 Private Sub InsQuote_Click()
427
428      message_text.SelText = Clipboard.GetText()
429      Call ShowFmt_Click
430
431 End Sub
432
433 Private Sub message_text_Click()
434     
435     CurrPos.Caption = Str$(message_text.SelStart) + " / " + Str$(Len(message_text.Text))
436
437 End Sub
438
439 Private Sub message_text_KeyDown(KeyCode As Integer, Shift As Integer)
440
441     CurrPos.Caption = Str$(message_text.SelStart) + " / " + Str$(Len(message_text.Text))
442
443 End Sub
444
445 Private Sub save_button_Click()
446     
447     a$ = message_text.Text
448     Do While Right$(a$, 2) = Chr$(13) + Chr$(10)
449         a$ = Left$(a$, Len(a$) - 2)
450         Loop
451     message_text.Text = Cit_Format(a$)
452     DoEvents
453
454     If begin_trans() = True Then
455         a$ = "ENT0 1|" + recp$
456         serv_puts (a$)
457         a$ = serv_gets()
458         If Left$(a$, 1) <> "4" Then
459             Call end_trans
460             MsgBox a$
461         Else
462             Transmit_Buffer (message_text.Text)
463             serv_puts ("000")
464             Call end_trans
465             HoldMessage$ = ""
466             Unload EnterMessage
467             Load RoomPrompt
468             End If
469         End If
470
471 End Sub
472
473 Private Sub ShowFmt_Click()
474     a$ = message_text.Text
475     Do While Right$(a$, 2) = Chr$(13) + Chr$(10)
476         a$ = Left$(a$, Len(a$) - 2)
477         Loop
478     message_text.Text = Cit_Format(a$)
479
480 End Sub
481