|
|
I have read it but is that all in visual basic 2008
and how
i have a form withh the buton and the textboxs
no of the codes will work:S
|
|
|
|
|
Add the following code in your send button click event handler.
MailMessage mail = new MailMessage();
mail.To = txtTo.Text;
mail.Bcc =txtBcc.Text;
mail.From = txtFrom.Text
mail.Subject = txtSubject.Text;
mail.Body = txtBody.Text;
SmtpMail.SmtpServer = txtSmpt.Text;
SmtpMail.Send(mail);
|
|
|
|
|
This is what i have maybe see you whats wrong?
Imports System.Net.Mail
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Try
Dim SmtpServer As New SmtpClient()
Dim mail As New MailMessage()
SmtpServer.Credentials = New _
Net.NetworkCredential("My mail", "password")
SmtpServer.Port = 587
SmtpServer.Host = "smtp.gmail.com"
mail = New MailMessage()
mail.From = New MailAddress("my mail")
mail.To.Add("textbox1.text")
mail.Subject = "Test Mail"
mail.Body = ("textbox2.text")
SmtpServer.Send(mail)
MsgBox("mail send")
Catch ex As Exception
MsgBox(ex.ToString)
End Try
End Sub
End Class
|
|
|
|
|
Johrans wrote: mail.To.Add("textbox1.text")
mail.To.Add(textbox1.text)
Johrans wrote: mail.Body = ("textbox2.text")
mail.Body = (textbox2.text)
|
|
|
|
|
And
smtp.server send(mail)
This is yellow whats wrong?
thanks for your support
|
|
|
|
|
Johrans wrote: This is yellow whats wrong?
I am sorry but what do you mean by yellow?
Johrans wrote: smtp.server send(mail
SmtpServer.Send(mail)
Books are as useful to a stupid person as a mirror is useful to a blind person. - Chanakya
|
|
|
|
|
Hi everyone.
I am busy with a app that prints a html file. Currently I'm using the WebBrowser control with a call to print in the DocumentCompleted method.
It works fine on my box but nothing happens on the clients server. If anyone can explain this to me I would be utterly greatfull.
Stephen
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
I figured out that it is the webbrowser control that doesn't do anything when its print method is called. Maby someone can help me figure out why it works fine on Win XP but fails on Win Server 2003 Enterprize
Stephen Lintott Bsc IT (RAU)
|
|
|
|
|
IE on Server 2003 is, by default, so heavily restricted, that you can't even go to Yahoo use you either add it to the Trusted sites list or remove all the restrictions.
But, after saying that, I don't have a 2003 box to test on. What's the error you get on that box?
|
|
|
|
|
I wanna send Email using Vb.net
code is.........
Dim message As New MailMessage(txtTo.Text, txtFrom.Text, txtSubject.Text, txtBody.Text)
Dim emailClient As New SmtpClient(txtSMTPServer.Text)
emailClient.Send(message)
litStatus.Text = "Message Sent"
Catch ex As Exception
litStatus.Text = ex.ToString()
Can anyone plz help me out what is the input of txtSMTPServer textbox as i am a Beiggner
|
|
|
|
|
To use this method you will need access to a SMTP server. txtSMTPServer is the name or IP address of the SMTP server.
|
|
|
|
|
how to convert any string to unicode encoding in vb.net code
|
|
|
|
|
Did you try this,
Encoding.Unicode.GetBytes(YourString);
|
|
|
|
|
Encoding.Unicode.GetString(Encoding.Default.GetBytes(yourStringVariable))
|
|
|
|
|
i want to make program like this:
if DataGridView2.item(SID).value = DataGridView1.item(LID).value then
color=green
else
color=red
i want all item list in DataGridView2.item(SID).value will be checked.
not only first cell
i mean like this(see the picture):
http://i43.tinypic.com/9posc2.jpg
modified on Thursday, February 26, 2009 8:24 AM
|
|
|
|
|
Colouring the background of a DataGridView-Cell works as following listed:
Dim cs As DataGridViewCellStyle
cs = New DataGridViewCellStyle
cs.BackColor = Color.Green
aDataGridView.Rows(r).Cells(c).Style = cs
Note, that the above code overwrites existing CellStyles you already assigned to a cell (maybe via the GUI-Design-Tool and so on).
For a complete row, you could use instead:
aDataGridView.Rows(r).DefaultCellStyle.BackColor = Color.Green
modified on Thursday, February 26, 2009 7:45 AM
|
|
|
|
|
Seee picturee.... http://i43.tinypic.com/9posc2.jpg
If DataGridView2.Item("BLnumber2", e.RowIndex).Value = DataGridView1.Item("BLNumber1", e.RowIndex).Value Then
modified on Thursday, February 26, 2009 9:19 AM
|
|
|
|
|
What exactly you need to know?
|
|
|
|
|
|
Hi to Everyone there,
I am going to deploy my vb.net2005 project.
I am wondering about the path name of all crystal report to be given in my code (code to get the crystal report in the crystal report viewer).
Should I give the application path or something else, since after deploying my path wont be the same.Or is there any other method to handle the same.
currently I am hardcoding the path like following
Dim strReportPath As String = "D:.....\rp1.rpt"
Thanks in advance
I am a learner Always
<div class="ForumMod">modified on Thursday, February 26, 2009 5:55 AM</div>
|
|
|
|
|
Well, what folder are you deploying the reports to in your installer?? If they are static reports (that never change), then you could put them in the Application folder (where your app's .EXE is) and then just use Path.Combine(Application.StartupPath, "report.rpt") in your code to generate the fully qualified path name.
|
|
|
|
|
thanks Dave for your reply,
I am a beginner. If u don't mind I need little more clarification.
I guess my reports are dynamic. I ask the user to input certain parameter before writing my CR code. And then I pass those parameters (eg: stud_Id) with the SQl query. Is this what u mean by a dynamic report. Hopefully so.
Could you please suggest a complete steps now. Should I put them in a folder? or leave the reports as it is(same position during creation). Then what do i write for the path.
Thanks in advance
I am a learner Always
|
|
|
|
|
Where are you putting the report files that you're telling CrystalReports to use when your report is generated??
|
|
|
|
|
thanks,
Currently I am not putting the report files in any folder...as when it gets created the same place it is in.(with the forms and module)...
Please suggest me. I don't mind putting the reports in folder or anything like that. But it should just work
Regards,
HImangshu S
|
|
|
|