|
-
Sep 1st, 2010, 08:12 PM
#1
Thread Starter
New Member
Convert VB.NET codes to VB6? Anyone, please! T.T
Greetings! I'm new here & asking for your help guys...Thanks! 
My codes from VB.NET is:
Code:
Dim mymailmsg As New MailMessage
Try
Dim response As MsgBoxResult = MsgBox("Do you want to continue sending?", MsgBoxStyle.Question + MsgBoxStyle.YesNo, "Sending Confirmation")
If response = MsgBoxResult.Yes Then
loading.Value = 10
mymailmsg.From = New MailAddress("[email protected]")
loading.Value = 20
mymailmsg.To.Add("[email protected]")
loading.Value = 30
mymailmsg.Subject = txtSubject.Text
loading.Value = 40
mymailmsg.Body = document.Text
loading.Value = 50
Dim smtp As New SmtpClient("smtp.example.com")
loading.Value = 60
smtp.Port = 587
loading.Value = 70
smtp.EnableSsl = True
loading.Value = 80
smtp.Credentials = New System.Net.NetworkCredential("[email protected]", "informatics")
loading.Value = 90
smtp.Send(mymailmsg)
loading.Value = 100
MsgBox("You have sent your message!")
loading.Value = 0
Else
End If
Catch ex As Exception
End Try
Can someone convert my codes to vb6? Thanks!!!
Last edited by si_the_geek; Sep 2nd, 2010 at 04:48 AM.
Reason: added Code tags, changed email addresses to known non-existant ones
-
Sep 2nd, 2010, 04:48 AM
#2
Re: Convert VB.NET codes to VB6? Anyone, please! T.T
Thread moved from 'Chit Chat' forum to 'VB6 and Earlier' forum
-
Sep 2nd, 2010, 05:01 AM
#3
Re: Convert VB.NET codes to VB6? Anyone, please! T.T
Here is th VB6 version. HOWEVER you could need to find a way of sending the emails through VB6 so I've commented out SMTP & mymailmsg.
Code:
Dim mymailmsg As New MailMessage
'Dim smtp As New SmtpClient("smtp.example.com")
Dim MsgBoxResult As Integer
MsgBoxResult = MsgBox("Do you want to continue sending?", vbQuestion + vbYesNo, "Sending Confirmation")
If MsgBoxResult = vbYes Then
loading.Value = 10
'mymailmsg.From = New MailAddress("[email protected]")
loading.Value = 20
'mymailmsg.To.Add ("[email protected]")
loading.Value = 30
'mymailmsg.Subject = txtSubject.Text
loading.Value = 40
'mymailmsg.Body = document.Text
loading.Value = 50
loading.Value = 60
smtp.Port = 587
loading.Value = 70
smtp.EnableSsl = True
loading.Value = 80
'smtp.Credentials = New System.Net.NetworkCredential("[email protected]", "informatics")
loading.Value = 90
'smtp.Send (mymailmsg)
loading.Value = 100
MsgBox ("You have sent your message!")
loading.Value = 0
Else
End If
_____________________________________________________________________
----If this post has helped you. Please take time to Rate it.
----If you've solved your problem, then please mark it as RESOLVED from Thread Tools.

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|