-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfrmUserAdd.frm
184 lines (173 loc) · 5.23 KB
/
frmUserAdd.frm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
VERSION 5.00
Begin VB.Form frmUserAdd
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 1065
ClientLeft = 0
ClientTop = 0
ClientWidth = 3000
BeginProperty Font
Name = "Tahoma"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
LinkTopic = "Form1"
ScaleHeight = 1065
ScaleWidth = 3000
ShowInTaskbar = 0 'False
StartUpPosition = 3 'Windows Default
Begin VB.PictureBox picExit
AutoSize = -1 'True
BorderStyle = 0 'None
Height = 150
Left = 2760
ScaleHeight = 150
ScaleWidth = 165
TabIndex = 7
Top = 75
Width = 165
End
Begin VB.TextBox txtIP
Appearance = 0 'Flat
Height = 255
Left = 1020
TabIndex = 6
Top = 690
Width = 1515
End
Begin VB.TextBox txtUName
Appearance = 0 'Flat
Height = 255
Left = 1020
TabIndex = 2
Top = 390
Width = 1515
End
Begin VB.PictureBox picTitle
AutoSize = -1 'True
BorderStyle = 0 'None
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 300
Left = 0
ScaleHeight = 300
ScaleWidth = 3000
TabIndex = 0
Top = 0
Width = 3000
Begin VB.Label lblTitle
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Add User to List"
BeginProperty Font
Name = "Verdana"
Size = 8.25
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00FFFFFF&
Height = 195
Left = 90
TabIndex = 1
Top = 45
Width = 1350
End
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "Domain/IP:"
Height = 195
Left = 150
TabIndex = 5
Top = 720
Width = 795
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "UserName:"
Height = 195
Left = 150
TabIndex = 4
Top = 420
Width = 795
End
Begin VB.Label lblAdd
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "add"
Height = 195
Left = 2640
TabIndex = 3
Top = 750
Width = 270
End
Begin VB.Shape Shape1
Height = 945
Left = 0
Top = 120
Width = 3000
End
End
Attribute VB_Name = "frmUserAdd"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private clsOnTop As New clskNote
Private Sub Form_Load()
Dim iTemp As Integer
Set clsOnTop = New clskNote
picTitle.Picture = LoadPicture(skinPath & "\titlesmall.gif")
picExit.Picture = LoadPicture(skinPath & "\x.gif")
iTemp = ReadINI("General", "keepontop", appDataPath)
If CBool(iTemp) Then
clsOnTop.MakeTopMost Me.hWnd
End If
iTemp = ReadINI("General", "transwin", appDataPath)
If CBool(iTemp) Then
MakeTransparent Me.hWnd, 230
End If
End Sub
Private Sub lblAdd_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblAdd.ForeColor = vbRed
Dim tUser As String
'check if user entered right stuff
If Trim(txtUName.Text = "") Or Trim(txtIP.Text = "") Then
MsgBox "Please enter correct data!", vbOKOnly, "Error"
Exit Sub
Else
'update list with stuff
frmMain.lstUsers.AddItem txtUName.Text & " - " & txtIP.Text
totUsers = totUsers + 1
UpdateUserINIList
End If
txtUName.Text = ""
txtIP.Text = ""
txtUName.SetFocus
End Sub
Private Sub lblAdd_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
lblAdd.ForeColor = vbBlack
End Sub
Private Sub picExit_Click()
Unload Me
End Sub
Private Sub picTitle_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
FormDrag Me
End Sub