
como leer los option button en archivo secuencial
Publicado por clor (5 intervenciones) el 16/05/2024 19:51:31
Hola
estoy haciendo un pequeño proyecto en visual basic 6.0
cuando guarda los datos me los guarda bien
el problema que tengo del proyecto es que no me lee los options buttons los demas valores si los lee
hay dos frame
------------------------ ----------------------------
0 option1 label7 0 option2 label9
0 option1 label8 0 option2 label10
------------------------- ------------------------------
text6.text text7.text
aqui dejo el codigo
gracias
estoy haciendo un pequeño proyecto en visual basic 6.0
cuando guarda los datos me los guarda bien
el problema que tengo del proyecto es que no me lee los options buttons los demas valores si los lee
hay dos frame
------------------------ ----------------------------
0 option1 label7 0 option2 label9
0 option1 label8 0 option2 label10
------------------------- ------------------------------
text6.text text7.text
aqui dejo 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
Public Sub limpiar()
Text1 = ""
Text2 = ""
Text3 = ""
Text4 = ""
Text5 = ""
Text1.SetFocusEnd Sub
Private Sub Command1_Click()
Dim mat As String * 7Dim nom As String * 30Dim postnom As String * 30Dim sexe As String * 10Dim price As String * 10Dim datenaiss As String * 10Dim adresse As String * 40mat = Text1nom = Text2postnom = Text3datenaiss = Text4adresse = Text5sexe = Text6.Text
price = Text7.Text
Open App.Path & "\fichero estudiante\" & (nom + ".txt") For Output As #1
Write #1, mat, nom, postnom, Option1(0).Value, Option1(1).Value, sexe, Option2(0).Value, Option2(1).Value, price, datenaiss, adresseClose #1MsgBox "Guardado exitosamente !", vbInformation, "Gestion Estudiante"
limpiar
End Sub
Private Sub Command2_Click()
limpiar
End Sub
Private Sub Command4_Click()
End
End Sub
Private Sub Command5_Click()
Dim F_check1, F_check2, F_check3, F_check4 As Integer
cd1.InitDir = App.Path & "\fichero estudiante\"
cd1.ShowOpenOpen cd1.FileName For Input As #1
Do While EOF(1) <> -1
Input #1, mat, nom, postnom, F_check1, F_check2, sexe, F_check3, F_check4, price, datenaiss, adresseText1 = mat Text2 = nom Text3 = postnom Text4 = datenaissText5 = adresseIf Option1(Index).Value = True Then
Option1(0).Caption = F_check1
Text6.Text = sexe
Else
Option1(1).Caption = F_check2
Text6.Text = sexe
End If
Text6.Text = sexe
If Option2(Index).Value = True Then
Option2(0).Caption = F_check3
Else
Option2(1).Caption = F_check4
End If
Text7.Text = price
Loop
Close #1End Sub
Private Sub Option1_Click(Index As Integer)
Select Case Index
Case 0: Text6.Text = Label7.Caption
Case 1: Text6.Text = Label8.Caption
End Select
End Sub
Private Sub Option2_Click(Index As Integer)
Select Case Index
Case 0: Text7.Text = Label9.Caption
Case 1: Text7.Text = Label10.Caption
End Select
End Sub
gracias
Valora esta pregunta


0

