¿bug en visual basic?
Publicado por juan (13 intervenciones) el 27/08/2016 18:39:54
hola, tengo una duda es que esto haciendo un programa de visual basic es un ejercicio de la escuena el tema es de "compra de repuestos de autos",mi problema es que cuando quiero elegir una imagen me que esta en visible= false y se supone que cuando la busque se pone en =true pero hay veses que no y se me queda una imagen en true y las demas no aparesen
este es el codigo
este es el codigo
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
Private Sub Combo1_Click()
If Combo1.Text = "FIAT" Then
cmd_peugeot.Visible = False
cmd_fiat.Visible = True
ElseIf Combo1.Text = "PEUGEOT" Then
cmd_peugeot.Visible = True
cmd_fiat.Visible = False
End If
End Sub
Private Sub Command1_Click() 'con testo es el problema
Image1.Left = 2147
If cmd_fiat = "ANILLO RESORTE SUSPENSION REGATTA M/N" Then
Image2.Visible = True
Image3.Visible = False
Image6.Visible = False
Image5.Visible = False
ElseIf cmd_fiat = "SOPORTE TIRANTE PALANCA CAMBIO DUNA UNO" Then
Image3.Visible = True
Image6.Visible = False
Image5.Visible = False
Image2.Visible = False
End If
If cmd_peugeot = "ABRAZADERA FILTRO GASOIL 206 306 PARTNER DW8" Then
Image5.Visible = True
Image2.Visible = False
Image3.Visible = False
Image6.Visible = False
ElseIf cmd_peugeot = "POLEA CIGUEÑAL PEUGEOT 504 505 3 CANALES" Then
Image6.Visible = True
Image5.Visible = False
Image2.Visible = False
Image3.Visible = False
End If
End Sub
Private Sub Command2_Click()
total = Text4.Text * Text1.Text
Text2 = total
End Sub
Private Sub Command3_Click()
List1.RemoveItem (List1.ListIndex)
End Sub
Private Sub Command4_Click()
List1.AddItem Text2.Text
Text4 = ""
Text1 = ""
Text2 = ""
End Sub
Private Sub Command5_Click()
Dim i As Integer
Dim total As Long
total = 0
For i = 0 To List1.ListCount - 1
total = total + Val(List1.List(i))
Next i
Text3.Text = total
End Sub
Private Sub Command6_Click()
Dim descuento As Double
If Text5.Text = "ve3sox21" Then
descuento = 0.85 * Text3.Text
Text6.Text = descuento
ElseIf Text5.Text = "xowb920" Then
descuento = 0.7 * Text3.Text
Text6.Text = descuento
Else
Label6.Visible = True
End If
End Sub
Private Sub Image1_DragDrop(Source As Control, X As Single, Y As Single)
If Source = Image2 Then
total = total + 28
ElseIf Source = Image3 Then
total = total + 347
ElseIf Source = Image4 Then
total = total + 103
ElseIf Source = Image5 Then
total = total + 177
ElseIf Source = Image6 Then
total = total + 512
ElseIf Source = Image7 Then
total = total + 608
End If
Text4.Text = total
End Sub
Private Sub Label5_Click()
Text5.Visible = True
Text6.Visible = True
Command6.Visible = True
End Sub
Valora esta pregunta


0