Click here to Skip to main content
15,892,674 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionApplication.DoEvents() equivalent in aspx Pin
Roger Rainey8-Dec-09 4:59
Roger Rainey8-Dec-09 4:59 
AnswerRe: Application.DoEvents() equivalent in aspx Pin
Dave Kreskowiak8-Dec-09 5:26
mveDave Kreskowiak8-Dec-09 5:26 
AnswerGetting status of batch process Pin
David Mujica8-Dec-09 6:14
David Mujica8-Dec-09 6:14 
QuestionHow to format Datagridview Columns Decimal Values? Pin
Paramu19738-Dec-09 4:04
Paramu19738-Dec-09 4:04 
AnswerRe: How to format Datagridview Columns Decimal Values? Pin
Dave Kreskowiak9-Dec-09 4:22
mveDave Kreskowiak9-Dec-09 4:22 
GeneralRe: How to format Datagridview Columns Decimal Values? Pin
Paramu19739-Dec-09 21:52
Paramu19739-Dec-09 21:52 
Questionhow to send mail by visual basic ? Pin
Golden Jing8-Dec-09 1:02
Golden Jing8-Dec-09 1:02 
AnswerRe: how to send mail by visual basic ? Pin
Paramu19738-Dec-09 4:35
Paramu19738-Dec-09 4:35 
Have a look ! Just I found in MSDN, Answered by Martin, also it will save the mail message as textfile.

Imports System.Net.Mail

Imports System.IO


Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

Dim mailInstance As MailMessage = New MailMessage("FromMailAdress", "ToMailAdress")
Try
mailInstance.Subject = "This is mail subject"
mailInstance.Body = "This is mail body content"
mailInstance.Attachments.Add(New Attachment("filename")) 'Optional
Dim mailSenderInstance As SmtpClient = New SmtpClient("smtpHostAdress", 25) '25 is the port of the SMTP host
mailSenderInstance.Credentials = New System.Net.NetworkCredential("LoginAccout", "Password")
mailSenderInstance.Send(mailInstance)
mailInstance.Dispose() 'Please remember to dispose this object
Catch ex As Exception
MessageBox.Show(ex.Message)
Dim sw As StreamWriter = New StreamWriter(My.Computer.FileSystem.SpecialDirectories.Desktop & "\myMail.txt")
sw.WriteLine(mailInstance.From)
sw.WriteLine(mailInstance.To)
sw.WriteLine(mailInstance.Subject)
sw.WriteLine(mailInstance.Body)
sw.WriteLine(mailInstance.Attachments)
sw.Close()

End Try
End Sub

Thumbs Up | :thumbsup:
GeneralRe: how to send mail by visual basic ? [modified] Pin
Golden Jing8-Dec-09 15:21
Golden Jing8-Dec-09 15:21 
QuestionSave Csv or excel file to sql using vb6.0 Pin
Parag Raibagkar7-Dec-09 18:49
Parag Raibagkar7-Dec-09 18:49 
AnswerRe: Save Csv or excel file to sql using vb6.0 Pin
Eddy Vluggen8-Dec-09 0:26
professionalEddy Vluggen8-Dec-09 0:26 
GeneralRe: Save Csv or excel file to sql using vb6.0 Pin
Parag Raibagkar8-Dec-09 20:04
Parag Raibagkar8-Dec-09 20:04 
GeneralRe: Save Csv or excel file to sql using vb6.0 Pin
Dave Kreskowiak9-Dec-09 3:52
mveDave Kreskowiak9-Dec-09 3:52 
QuestionMultithreaded App using 100% CPU...how can i make it use less? [modified] Pin
Aaron @ Think Software7-Dec-09 0:11
professionalAaron @ Think Software7-Dec-09 0:11 
AnswerRe: Multithreaded App using 100% CPU...how can i make it use less? Pin
David Skelly7-Dec-09 0:40
David Skelly7-Dec-09 0:40 
GeneralRe: Multithreaded App using 100% CPU...how can i make it use less? Pin
Aaron @ Think Software7-Dec-09 0:44
professionalAaron @ Think Software7-Dec-09 0:44 
GeneralRe: Multithreaded App using 100% CPU...how can i make it use less? Pin
David Skelly7-Dec-09 2:35
David Skelly7-Dec-09 2:35 
AnswerRe: Multithreaded App using 100% CPU...how can i make it use less? PinPopular
Luc Pattyn7-Dec-09 0:43
sitebuilderLuc Pattyn7-Dec-09 0:43 
GeneralRe: Multithreaded App using 100% CPU...how can i make it use less? Pin
Aaron @ Think Software7-Dec-09 0:59
professionalAaron @ Think Software7-Dec-09 0:59 
GeneralRe: Multithreaded App using 100% CPU...how can i make it use less? Pin
Luc Pattyn7-Dec-09 1:11
sitebuilderLuc Pattyn7-Dec-09 1:11 
GeneralRe: Multithreaded App using 100% CPU...how can i make it use less? Pin
N a v a n e e t h7-Dec-09 3:03
N a v a n e e t h7-Dec-09 3:03 
GeneralRe: Multithreaded App using 100% CPU...how can i make it use less? Pin
Luc Pattyn7-Dec-09 3:17
sitebuilderLuc Pattyn7-Dec-09 3:17 
QuestionHow to print out a Quotation mark. Pin
thebiostyle6-Dec-09 16:16
thebiostyle6-Dec-09 16:16 
AnswerRe: How to print out a Quotation mark. Pin
Dave Kreskowiak6-Dec-09 17:47
mveDave Kreskowiak6-Dec-09 17:47 
QuestionHow to MDI child form call method from MID parent form??? Pin
cotdot111116-Dec-09 15:49
cotdot111116-Dec-09 15:49 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.