Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Type Configuracion(Nombre As String)
End Sub
Sub cmdAbrir_Click
Try
Dim rm As RandomAccessFile
Dim conf As Configuracion
rm.Initialize(File.DirInternal,"datos.conf",False)
conf = rm.ReadEncryptedObject("123",0)
rm.Close
txtNombre.Text = conf.Nombre
Catch
ToastMessageShow("Error no hay datos guardados",True)
End Try
End Sub
Sub cmdGuardar_Click
Try
Dim rm As RandomAccessFile
Dim conf As Configuracion
conf.Initialize
rm.Initialize(File.DirInternal,"datos.conf",False)
conf.Nombre = txtNombre.Text
rm.WriteEncryptedObject(conf,"123",0)
rm.Close
ToastMessageShow("Datos guardados exitosamente",True)
Catch
ToastMessageShow("Error al intentar guardar datos",True)
End Try
End Sub