VERSION 5.00
Begin VB.Form Config 
   Caption         =   "Configuración"
   ClientHeight    =   2715
   ClientLeft      =   6840
   ClientTop       =   5175
   ClientWidth     =   4875
   Icon            =   "config.frx":0000
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   2715
   ScaleWidth      =   4875
   Begin VB.TextBox Text1 
      Enabled         =   0   'False
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   2880
      TabIndex        =   11
      Top             =   2280
      Width           =   1815
   End
   Begin VB.FileListBox File1 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1140
      Left            =   2880
      TabIndex        =   8
      Top             =   1140
      Width           =   1815
   End
   Begin VB.DriveListBox Drive1 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   330
      Left            =   120
      TabIndex        =   7
      Top             =   2280
      Width           =   2775
   End
   Begin VB.DirListBox Dir1 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   1050
      Left            =   120
      TabIndex        =   6
      Top             =   1140
      Width           =   2775
   End
   Begin VB.CommandButton Anexo 
      Appearance      =   0  'Flat
      Caption         =   "Anexo >>"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3720
      TabIndex        =   5
      Top             =   660
      Width           =   975
   End
   Begin VB.CommandButton Salir 
      Appearance      =   0  'Flat
      Caption         =   "Salir"
      Default         =   -1  'True
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   375
      Left            =   3720
      TabIndex        =   4
      Top             =   120
      Width           =   975
   End
   Begin VB.TextBox Smtp 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   840
      TabIndex        =   0
      Top             =   120
      Width           =   2775
   End
   Begin VB.TextBox De 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   840
      TabIndex        =   1
      Top             =   420
      Width           =   2775
   End
   Begin VB.TextBox Para 
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   285
      Left            =   840
      TabIndex        =   3
      Top             =   720
      Width           =   2775
   End
   Begin VB.Label Label1 
      AutoSize        =   -1  'True
      Caption         =   "SMTP"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   10
      Top             =   180
      Width           =   405
   End
   Begin VB.Label Label2 
      AutoSize        =   -1  'True
      Caption         =   "De"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   9
      Top             =   480
      Width           =   195
   End
   Begin VB.Label Label3 
      AutoSize        =   -1  'True
      Caption         =   "Para"
      BeginProperty Font 
         Name            =   "Arial"
         Size            =   8.25
         Charset         =   0
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   210
      Left            =   120
      TabIndex        =   2
      Top             =   780
      Width           =   330
   End
End
Attribute VB_Name = "Config"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const AlturaAnexoAbierto = 3100
Const AlturaAnexoCerrado = 1500
Const TextoAnexoAbierto = "Anexo <<"
Const TextoAnexoCerrado = "Anexo >>"
Private Sub Anexo_Click()
   If Cfg.AnexoVisible Then
      Anexo.Caption = TextoAnexoCerrado
      Height = AlturaAnexoCerrado
      Cfg.AnexoVisible = False
   Else
      Anexo.Caption = TextoAnexoAbierto
      Height = AlturaAnexoAbierto
      Cfg.AnexoVisible = True
   End If
End Sub

Private Sub Dir1_Change()
   File1.Path = Dir1.Path
   Cfg.Directorio = Dir1.Path
   'Cfg.FicheroAnexo = ""
   Text1.Text = ""
End Sub

Private Sub Drive1_Change()
   Dir1.Path = Drive1.Drive
   Cfg.Disco = Drive1.Drive
   'Cfg.FicheroAnexo = ""
   Text1.Text = ""
End Sub

Private Sub Salir_Click()
   Cfg.Smtp = Smtp.Text
   Cfg.De = De.Text
   Cfg.Para = Para.Text
   Cfg.FicheroAnexo = Text1.Text
   Open DirAplicacion & "\correo.cfg" For Output As #2
   Write #2, Cfg.Disco, Cfg.Directorio, Cfg.FicheroAnexo, Cfg.AnexoVisible, Cfg.HayAnexo, Cfg.Smtp, Cfg.De, Cfg.Para
   Close #2
   Unload Config
End Sub

Private Sub File1_Click()
   Text1.Text = File1.FileName
   Cfg.FicheroAnexo = File1.FileName
   Cfg.HayAnexo = True
End Sub

Private Sub Form_Load()
   Left = correo.Left + 800
   Top = correo.Top + 450
   Smtp.Text = Cfg.Smtp
   De.Text = Cfg.De
   Para.Text = Cfg.Para
   
   If Cfg.AnexoVisible Then
      Height = AlturaAnexoAbierto
      Anexo.Caption = TextoAnexoAbierto
   Else
      Height = AlturaAnexoCerrado
      Anexo.Caption = TextoAnexoCerrado
   End If
   If Cfg.HayAnexo Then
      Drive1.Drive = Cfg.Disco
      Dir1.Path = Cfg.Directorio
      Text1 = Cfg.FicheroAnexo
   Else
      Cfg.Disco = Drive1.Drive
      Cfg.Directorio = Dir1.Path
      Cfg.FicheroAnexo = File1.FileName
   End If
End Sub

