G
Guest
Email Question:
When I send an email (basically a sms to a phone) from ms outlook it works
fine. When I try to send it pragmatically I get an error stating that it
can’t relay for <the email address>
Try
If Not strMailSv = "" Then
If Not msgTo = "" Then
Dim message As New MailMessage(sMailFrom, _
msgTo, _
sMailSubject, _
sTextBody)
Dim emailClient As New SmtpClient(strMailSv)
emailClient.Send(message)
'MsgBox("Message Sent")
Else
MsgBox("No recepiant specified",
MsgBoxStyle.Critical, "Mail")
End If
Else
MsgBox("No mail server specified", MsgBoxStyle.Critical,
"Mail")
End If
Catch ex As Exception
MsgBox(ex.ToString())
End Try
Is there a way to send it and authenticate with the server using this method?
Graphics Question:
I have a borderless form that has a transparent background. I only wanted
the color that I painted the background with to be transparent and not the
controls on the form. The problem I am having is when I pass another window
in front of it or drag the window, it doesn’t repaint with the transparent
background. It just shows the drag marks of the window that I dragged in
front of it. The other thing I noticed was if I do an invalidate() it just
gets darker and eventual it will because a solid color again.
This is my code that I am using:
Private Sub DoubleBuffering_Paint(ByVal sender As Object, _
ByVal e As PaintEventArgs) Handles MyBase.Paint
Dim g As Graphics '= e.Graphics
Dim Dw As Bitmap
Dw = New Bitmap(Me.Width, Me.Height, e.Graphics)
g = Graphics.FromImage(Dw)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
DrawRoundedForm(0, _
0, _
Me.Width, _
Me.Height, _
18, _
Me.Region)
'filling the main background
Dim cl As New SolidBrush(Color.FromArgb(125, Color.Black))
g.FillRectangle(cl, New RectangleF(0, 0, Me.Width, Me.Height))
cl.Dispose()
Dim c2 As New SolidBrush(Color.WhiteSmoke)
g.FillRectangle(c2, New RectangleF(15, 15, Me.Width - 30, Me.Height
- 30))
c2.Dispose()
e.Graphics.DrawImageUnscaled(Dw, 0, 0)
g.Dispose()
End Sub
Protected Overrides Sub OnPaintBackground(ByVal pevent As
System.Windows.Forms.PaintEventArgs)
'prevents flickering on background redraw, does not redraw the
background
'MyBase.OnPaintBackground(pevent)
End Sub
Any body have any ideas?
Last question, thought I might through this in.. I like how Windows vista
takes and blers the background. Is there a way to do that behind this window?
Thought I might ask..
When I send an email (basically a sms to a phone) from ms outlook it works
fine. When I try to send it pragmatically I get an error stating that it
can’t relay for <the email address>
Try
If Not strMailSv = "" Then
If Not msgTo = "" Then
Dim message As New MailMessage(sMailFrom, _
msgTo, _
sMailSubject, _
sTextBody)
Dim emailClient As New SmtpClient(strMailSv)
emailClient.Send(message)
'MsgBox("Message Sent")
Else
MsgBox("No recepiant specified",
MsgBoxStyle.Critical, "Mail")
End If
Else
MsgBox("No mail server specified", MsgBoxStyle.Critical,
"Mail")
End If
Catch ex As Exception
MsgBox(ex.ToString())
End Try
Is there a way to send it and authenticate with the server using this method?
Graphics Question:
I have a borderless form that has a transparent background. I only wanted
the color that I painted the background with to be transparent and not the
controls on the form. The problem I am having is when I pass another window
in front of it or drag the window, it doesn’t repaint with the transparent
background. It just shows the drag marks of the window that I dragged in
front of it. The other thing I noticed was if I do an invalidate() it just
gets darker and eventual it will because a solid color again.
This is my code that I am using:
Private Sub DoubleBuffering_Paint(ByVal sender As Object, _
ByVal e As PaintEventArgs) Handles MyBase.Paint
Dim g As Graphics '= e.Graphics
Dim Dw As Bitmap
Dw = New Bitmap(Me.Width, Me.Height, e.Graphics)
g = Graphics.FromImage(Dw)
g.SmoothingMode = Drawing2D.SmoothingMode.HighQuality
DrawRoundedForm(0, _
0, _
Me.Width, _
Me.Height, _
18, _
Me.Region)
'filling the main background
Dim cl As New SolidBrush(Color.FromArgb(125, Color.Black))
g.FillRectangle(cl, New RectangleF(0, 0, Me.Width, Me.Height))
cl.Dispose()
Dim c2 As New SolidBrush(Color.WhiteSmoke)
g.FillRectangle(c2, New RectangleF(15, 15, Me.Width - 30, Me.Height
- 30))
c2.Dispose()
e.Graphics.DrawImageUnscaled(Dw, 0, 0)
g.Dispose()
End Sub
Protected Overrides Sub OnPaintBackground(ByVal pevent As
System.Windows.Forms.PaintEventArgs)
'prevents flickering on background redraw, does not redraw the
background
'MyBase.OnPaintBackground(pevent)
End Sub
Any body have any ideas?
Last question, thought I might through this in.. I like how Windows vista
takes and blers the background. Is there a way to do that behind this window?
Thought I might ask..