Initial revision
[citadel.git] / wincit / invite.frm
1 VERSION 4.00
2 Begin VB.Form Invite 
3    Appearance      =   0  'Flat
4    BackColor       =   &H00C0C0C0&
5    BorderStyle     =   3  'Fixed Dialog
6    Caption         =   "Invite a user"
7    ClientHeight    =   3225
8    ClientLeft      =   2430
9    ClientTop       =   2940
10    ClientWidth     =   4710
11    ControlBox      =   0   'False
12    BeginProperty Font 
13       name            =   "MS Sans Serif"
14       charset         =   0
15       weight          =   700
16       size            =   8.25
17       underline       =   0   'False
18       italic          =   0   'False
19       strikethrough   =   0   'False
20    EndProperty
21    ForeColor       =   &H80000008&
22    Height          =   3630
23    Left            =   2370
24    LinkTopic       =   "Form1"
25    MaxButton       =   0   'False
26    MDIChild        =   -1  'True
27    MinButton       =   0   'False
28    ScaleHeight     =   3225
29    ScaleWidth      =   4710
30    Top             =   2595
31    Width           =   4830
32    Begin Threed.SSPanel Panel3D1 
33       Height          =   615
34       Left            =   120
35       TabIndex        =   5
36       Top             =   1560
37       Width           =   4455
38       _Version        =   65536
39       _ExtentX        =   7858
40       _ExtentY        =   1085
41       _StockProps     =   15
42       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
43          name            =   "MS Sans Serif"
44          charset         =   0
45          weight          =   700
46          size            =   12
47          underline       =   0   'False
48          italic          =   0   'False
49          strikethrough   =   0   'False
50       EndProperty
51       BevelInner      =   1
52       Begin VB.ComboBox UserName 
53          Appearance      =   0  'Flat
54          BackColor       =   &H00FFFFFF&
55          BeginProperty Font 
56             name            =   "MS Sans Serif"
57             charset         =   0
58             weight          =   700
59             size            =   12
60             underline       =   0   'False
61             italic          =   0   'False
62             strikethrough   =   0   'False
63          EndProperty
64          Height          =   420
65          Left            =   120
66          TabIndex        =   6
67          Top             =   120
68          Width           =   4215
69       End
70    End
71    Begin VB.CommandButton invite_button 
72       Appearance      =   0  'Flat
73       BackColor       =   &H80000005&
74       Caption         =   "&Invite this user"
75       Height          =   735
76       Left            =   120
77       TabIndex        =   0
78       Top             =   2400
79       Width           =   2175
80    End
81    Begin VB.CommandButton cancel_button 
82       Appearance      =   0  'Flat
83       BackColor       =   &H80000005&
84       Caption         =   "&Cancel"
85       Height          =   735
86       Left            =   2400
87       TabIndex        =   4
88       Top             =   2400
89       Width           =   2175
90    End
91    Begin Threed.SSPanel RoomName 
92       Height          =   735
93       Left            =   120
94       TabIndex        =   3
95       Top             =   360
96       Width           =   4455
97       _Version        =   65536
98       _ExtentX        =   7858
99       _ExtentY        =   1296
100       _StockProps     =   15
101       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
102          name            =   "MS Sans Serif"
103          charset         =   0
104          weight          =   700
105          size            =   12
106          underline       =   0   'False
107          italic          =   0   'False
108          strikethrough   =   0   'False
109       EndProperty
110       BevelInner      =   1
111    End
112    Begin VB.Label Label2 
113       Alignment       =   2  'Center
114       Appearance      =   0  'Flat
115       BackColor       =   &H80000005&
116       BackStyle       =   0  'Transparent
117       Caption         =   "User to invite:"
118       ForeColor       =   &H80000008&
119       Height          =   255
120       Left            =   120
121       TabIndex        =   1
122       Top             =   1320
123       Width           =   4455
124    End
125    Begin VB.Label Label1 
126       Alignment       =   2  'Center
127       Appearance      =   0  'Flat
128       BackColor       =   &H80000005&
129       BackStyle       =   0  'Transparent
130       Caption         =   "Room Name:"
131       ForeColor       =   &H80000008&
132       Height          =   255
133       Left            =   120
134       TabIndex        =   2
135       Top             =   120
136       Width           =   4455
137    End
138 End
139 Attribute VB_Name = "Invite"
140 Attribute VB_Creatable = False
141 Attribute VB_Exposed = False
142
143 Private Sub cancel_button_Click()
144
145     Unload Invite
146     Load RoomPrompt
147
148 End Sub
149
150 Private Sub Form_Load()
151     Show
152     Invite.WindowState = 0
153     Invite.Top = Int((MainWin.Height - Invite.Height) / 3)
154     Invite.Left = Int((MainWin.Width - Invite.Width) / 2)
155     RoomName.Caption = CurrRoomName$
156     DoEvents
157
158 If begin_trans() = True Then
159     
160     serv_puts ("LIST")
161     a$ = serv_gets()
162     If Left$(a$, 1) = "1" Then
163         Do
164             a$ = serv_gets()
165             If (a$ <> "000") Then UserName.AddItem (extract(a$, 0))
166             DoEvents
167             Loop Until a$ = "000"
168         End If
169     Call end_trans
170     End If
171
172 End Sub
173
174 Private Sub invite_button_Click()
175
176 If begin_trans() = True Then
177
178     serv_puts ("INVT " + UserName.Text)
179     a$ = serv_gets()
180     Call end_trans
181
182     If Left$(a$, 1) <> "2" Then
183         MsgBox Right$(a$, Len(a$) - 4), 16, "Error"
184     Else
185         Unload Invite
186         Load RoomPrompt
187         End If
188
189     End If
190
191 End Sub
192