Visual Basic.NET - Pasar funcion de vb6 a vb.net

 
Vista:

Pasar funcion de vb6 a vb.net

Publicado por Julián Andrés (30 intervenciones) el 08/11/2006 14:35:05
Necesito pasar estas dos funciones a .net 2005, y nada q puedo con los open, ya lo pude organizar pero con binary y no me está dejando leer el archivo, necesito mostrar en el form lo q hay en el .txt, q hago?????????????????????????????

Dim LoteI As String * 6, LoteF As String * 6 ''''Se supone q no se puede limitar el length
Dim registro As String * 12 '''''en .net, entonces como hago????

Public Sub Leer_Archivo()
Open Ruta & "\LOTES.TXT" For Random As #10 Len = Len(registro)
If FileLen(Ruta & "\LOTES.TXT") = 0 Then
MsgBox "El archivo de lotes no existe. Por favor Verifique"
Exit Sub
End If
Get #10, 1, registro
LoteI = Mid(registro, 1, 6)
LoteF = Mid(registro, 7, 6)
txtLoteI.Text = LoteI
txtLoteF.Text = LoteF
End Sub

Private Sub cmdGuardar_Click()
If txtLoteI.Text = "" Or txtLoteF.Text = "" Then
MsgBox "Error en los datos de lotes. Verifique"
Exit Sub
End If
LoteI = txtLoteI.Text
LoteF = txtLoteF.Text
If CLng(LoteI) >= CLng(LoteF) Then
MsgBox "Error en los datos de lotes. Verifique"
Exit Sub
End If
registro = LoteI & LoteF
Put #10, 1, registro
txtLoteI.Text = ""
txtLoteF.Text = ""
End Sub
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder