-
Notifications
You must be signed in to change notification settings - Fork 0
/
easyc.Frm
415 lines (377 loc) · 10.8 KB
/
easyc.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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
VERSION 4.00
Begin VB.Form Form1
AutoRedraw = -1 'True
BackColor = &H00000000&
BorderStyle = 1 'Fixed Single
Caption = "Easy Colors [0.20 Beta Version]"
ClientHeight = 2130
ClientLeft = 2445
ClientTop = 3075
ClientWidth = 5385
Height = 2535
Icon = "easyc.frx":0000
Left = 2385
LinkTopic = "Paleta de Colores"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2130
ScaleWidth = 5385
Top = 2730
Width = 5505
Begin VB.CommandButton Command1
Caption = "Copiar al Portapapeles"
Height = 220
Left = 1095
TabIndex = 21
Top = 1800
Width = 2145
End
Begin VB.TextBox rgbresult
Alignment = 2 'Center
BackColor = &H00808080&
BorderStyle = 0 'None
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "MS Serif"
Size = 6.75
Charset = 0
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00C0FFC0&
Height = 195
Left = 120
Locked = -1 'True
TabIndex = 20
Top = 1800
Width = 855
End
Begin VB.CommandButton listado
Caption = "Listado"
Height = 495
Left = 3480
TabIndex = 19
Top = 1495
Width = 855
End
Begin VB.TextBox hexaresult
Alignment = 2 'Center
BackColor = &H00404040&
BorderStyle = 0 'None
ForeColor = &H0080FFFF&
Height = 210
Left = 120
Locked = -1 'True
TabIndex = 18
Top = 1460
Width = 855
End
Begin VB.CommandButton copiar
Caption = "Copiar al Portapapeles"
Default = -1 'True
Height = 255
Left = 1080
TabIndex = 17
Top = 1440
Width = 2175
End
Begin VB.TextBox hexaazul
Alignment = 2 'Center
BorderStyle = 0 'None
Enabled = 0 'False
Height = 225
Left = 120
Locked = -1 'True
MaxLength = 3
TabIndex = 16
Top = 1035
Width = 375
End
Begin VB.TextBox hexaverde
Alignment = 2 'Center
BorderStyle = 0 'None
Enabled = 0 'False
Height = 225
Left = 120
Locked = -1 'True
MaxLength = 3
TabIndex = 15
Top = 600
Width = 375
End
Begin VB.TextBox hexarojo
Alignment = 2 'Center
BorderStyle = 0 'None
Enabled = 0 'False
Height = 225
Left = 120
Locked = -1 'True
MaxLength = 3
TabIndex = 14
Top = 210
Width = 375
End
Begin VB.CommandButton help
Caption = "···"
BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851}
Name = "Symbol"
Size = 8.25
Charset = 2
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 195
Left = 4680
TabIndex = 13
Top = 1260
Width = 435
End
Begin VB.TextBox mezcla
BorderStyle = 0 'None
Enabled = 0 'False
Height = 850
Left = 4470
TabIndex = 12
Top = 315
Width = 850
End
Begin VB.TextBox cazul
BorderStyle = 0 'None
Enabled = 0 'False
Height = 225
Left = 4050
TabIndex = 11
Top = 1050
Width = 225
End
Begin VB.TextBox cverde
BorderStyle = 0 'None
Enabled = 0 'False
Height = 225
Left = 4050
TabIndex = 10
Top = 630
Width = 225
End
Begin VB.TextBox crojo
BackColor = &H00FFFFFF&
BorderStyle = 0 'None
Enabled = 0 'False
Height = 225
Left = 4050
TabIndex = 9
Top = 210
Width = 225
End
Begin VB.TextBox azul
Alignment = 2 'Center
BorderStyle = 0 'None
Height = 225
Left = 3525
MaxLength = 3
TabIndex = 8
Top = 1050
Width = 400
End
Begin VB.TextBox verde
Alignment = 2 'Center
BorderStyle = 0 'None
Height = 225
Left = 3525
MaxLength = 3
TabIndex = 7
Top = 630
Width = 400
End
Begin VB.TextBox rojo
Alignment = 2 'Center
BorderStyle = 0 'None
Height = 225
Left = 3525
MaxLength = 3
TabIndex = 6
Top = 210
Width = 400
End
Begin VB.TextBox Text3
BackColor = &H00FF0000&
BorderStyle = 0 'None
Enabled = 0 'False
Height = 225
Left = 585
TabIndex = 5
Top = 1050
Width = 225
End
Begin VB.TextBox Text2
BackColor = &H0000FF00&
BorderStyle = 0 'None
Enabled = 0 'False
Height = 225
Left = 585
TabIndex = 4
Top = 615
Width = 225
End
Begin VB.TextBox Text1
BackColor = &H000000FF&
BorderStyle = 0 'None
Enabled = 0 'False
ForeColor = &H000000FF&
Height = 225
Left = 585
TabIndex = 3
Top = 210
Width = 225
End
Begin VB.HScrollBar azulscr
Height = 225
Left = 900
Max = 255
TabIndex = 2
Top = 1080
Width = 2535
End
Begin VB.HScrollBar verdescr
Height = 225
Left = 900
Max = 255
TabIndex = 1
Top = 630
Width = 2535
End
Begin VB.HScrollBar rojoscr
Height = 225
Left = 900
Max = 255
TabIndex = 0
Top = 210
Width = 2535
End
End
Attribute VB_Name = "Form1"
Attribute VB_Creatable = False
Attribute VB_Exposed = False
Option Explicit
Private r, g, b
Private Sub azul_Change()
If azul.Text = "" Then
Else
If Val(azul.Text) < 0 Then azul.Text = "0"
If Val(azul.Text) > 255 Then azul.Text = "255"
azulscr.Value = Val(azul.Text)
cazul.BackColor = RGB(0, 0, Val(azul.Text))
mezcla.BackColor = RGB(Val(rojo.Text), Val(verde.Text), Val(azul.Text))
End If
hexaresult.Text = Hex(Val(rojo.Text)) & Hex(Val(verde.Text)) & Hex(Val(azul.Text))
End Sub
Private Sub azulscr_Change()
azul.Text = azulscr.Value
hexaazul.Text = Hex(azulscr.Value)
hexaresult.Text = Hex(Val(rojo.Text)) & Hex(Val(verde.Text)) & Hex(Val(azul.Text))
'Poniendo valores RGB en resultado
r = Val(rojo.Text)
g = Val(verde.Text)
b = Val(azul.Text)
rgbresult.Text = ""
rgbresult.Text = r & "," & g & "," & b
'Fin de la exposicion
End Sub
Private Sub azulscr_Scroll()
azulscr_Change
End Sub
Private Sub Command1_Click()
Clipboard.Clear
Clipboard.SetText rgbresult.Text
End Sub
Private Sub hexaresult_KeyPress(KeyAscii As Integer)
Beep
End Sub
Private Sub listado_Click()
'MsgBox "Lo sentimos, opcion no disponible por el momento. Trabajando en ello."
'listadoform.Show
MsgBox "Disculpa, estoy sobre esta seccion para completarla.", 32, "Opcion en fase Preeliminar"
listadoform.Show
Form1.Enabled = False
End Sub
Private Sub Copiar_Click()
Clipboard.Clear
Clipboard.SetText hexaresult.Text
End Sub
Private Sub Command2_Click()
End
End Sub
Private Sub Form_Load()
rojoscr.Value = 128
verdescr.Value = 128
azulscr.Value = 128
'definimos valores hexadecimales
hexarojo.Text = Hex(rojoscr.Value)
hexaverde.Text = Hex(verdescr.Value)
hexaazul.Text = Hex(azulscr.Value)
End Sub
Private Sub Form_Unload(Cancel As Integer)
Form2.Hide
End
End Sub
Private Sub help_Click()
Form2.Show
Form1.Enabled = False
End Sub
Private Sub Label1_Click()
End Sub
Private Sub rojo_Change()
If rojo.Text = "" Then
Else
If Val(rojo.Text) < 0 Then rojo.Text = "0"
If Val(rojo.Text) > 255 Then rojo.Text = "255"
rojoscr.Value = Val(rojo.Text)
crojo.BackColor = RGB(Val(rojo.Text), 0, 0)
mezcla.BackColor = RGB(Val(rojo.Text), Val(verde.Text), Val(azul.Text))
End If
hexaresult.Text = Hex(Val(rojo.Text)) & Hex(Val(verde.Text)) & Hex(Val(azul.Text))
End Sub
Private Sub rojoscr_Change()
rojo.Text = rojoscr.Value
hexarojo.Text = Hex(rojoscr.Value)
hexaresult.Text = Hex(Val(rojo.Text)) & Hex(Val(verde.Text)) & Hex(Val(azul.Text))
'Poniendo valores RGB en resultado
r = Val(rojo.Text)
g = Val(verde.Text)
b = Val(azul.Text)
rgbresult.Text = ""
rgbresult.Text = r & "," & g & "," & b
'Fin de la exposicion
End Sub
Private Sub rojoscr_Scroll()
rojoscr_Change
End Sub
Private Sub verde_Change()
If verde.Text = "" Then
Else
If Val(verde.Text) < 0 Then verde.Text = "0"
If Val(verde.Text) > 255 Then verde.Text = "255"
verdescr.Value = Val(verde.Text)
cverde.BackColor = RGB(0, Val(verde.Text), 0)
mezcla.BackColor = RGB(Val(rojo.Text), Val(verde.Text), Val(azul.Text))
End If
hexaresult.Text = Hex(Val(rojo.Text)) & Hex(Val(verde.Text)) & Hex(Val(azul.Text))
End Sub
Private Sub verdescr_Change()
verde.Text = verdescr.Value
hexaverde.Text = Hex(verdescr.Value)
hexaresult.Text = Hex(Val(rojo.Text)) & Hex(Val(verde.Text)) & Hex(Val(azul.Text))
'Poniendo valores RGB en resultado
r = Val(rojo.Text)
g = Val(verde.Text)
b = Val(azul.Text)
rgbresult.Text = ""
rgbresult.Text = r & "," & g & "," & b
'Fin de la exposicion
End Sub
Private Sub verdescr_Scroll()
verdescr_Change
End Sub