473,385 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Email and Graphics Question for vb.net vs2005

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..

Feb 1 '07 #1
1 1316
Andrew wrote:
Email Question:
<big snip>
Graphics Question:
<sbig nip>
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?
<snip>

You have two (or, maybe, two and a half) completely unrelated
questions in a single post. Although this is not a crime (just bad
practice), I suggest next time you post each question in its sepparate
thread. I guess you'll have much better chances of getting an answer.

Regards,

Branco.

Feb 1 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: john andrew | last post by:
-- hello In VB6 you can do graphics OK with directx and API's. I can do OOP in VB6. The graphics routines may be different tha VB.net but are they easierto code in than VB6. Just being...
1
by: Jeff Gaines | last post by:
I've noticed that in adding a graphic to, say, a button the defaults are now gif, jpg, jpeg, bmp, wmf and png. You can use icons if you select 'All Files'. Does that mean icons are on their way...
0
by: javawzl | last post by:
We are in the process of moving to ASP.Net from classic ASP. I believe it makes sense that our web/graphics designers work in VS2005 when styling, formatting, etc.; but wanted to confirm that...
15
by: dgk | last post by:
I'm trying to save the image of a webbrowser control. Not a particular image being shown on the page, but rather the visible display of the webbrowser. Using VS2005 I figured that maybe...
3
by: Siv | last post by:
Hi, A little while ago I wrote a small program that allowed the user to view products from a database. The database holds the details of the products which can be viewed via a form and...
0
by: wulongtea | last post by:
I am trying generate an HTML email message with C# Visual Studio 2003 that has a graphics file embedded in the message. (I know i should be using 2005 and the new classes there, but I cannot upgrade...
9
by: she_prog | last post by:
Dear All, I need to save the content of a panel to a bitmap. The panel can have many child controls which also need to be saved. The problem would be solved if I could have the panel saved to a...
1
by: Doug | last post by:
Hi I am using the VS2005 setup and deployment project template to deploy my new app. However it only seems to allow graphics during the setup process to be placed in the top banner area. ...
0
by: =?Utf-8?B?TWFyazEyMw==?= | last post by:
I have two pieces of VB.NET code below: a) Sends an email b) Returns a programmatically created jpeg image to a webpage. How can I embed the programmatically created jpeg into an HTML...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.