|
Hi,
I'm using Visual Basic 2008 Express Edition. I done some google search on any guidance on how to write a Visual basic program to receive email, but without any success.
Can anyone kindly advise or guide me how to code the Visual basic program to receive/read email?
Thank you very much for your help.
|
|
|
|
|
Recieving email is not trivial. I don't think there's classes built in for that, just for sending it.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
You'll need to implement an SMTP server. The RFC is here[^] - you'll need to implement the server side commands.
|
|
|
|
|
Hi, I would try to search here[^] and see if there is something I can use.
Good luck: Didi
modified on Tuesday, June 2, 2009 4:56 PM
|
|
|
|
|
Um, no. SMTP is used to send mail. The poster wants to know how to receive mail; POP3 is the correct protocol
Between the idea
And the reality
Between the motion
And the act
Falls the Shadow
|
|
|
|
|
...you are absolutly right and I am a fool...
|
|
|
|
|
Hi,
Where can I find some information about creating an Excel XLL addin.
I have created many macros in VBA and now I want for security reasons convert it into a compiled format like XLL using VB.net 2008. It has to be easely distriutable for the other users. now I use a script on login. it checks if there is a new version. If so copy it into the addin folder. over the old version. The users see nothing happening on there computer. When Excel starts the new version is there.
Preferable in Dutch(Nederlands) or in English
Jan
|
|
|
|
|
Look here[^]
Regards: Didi
|
|
|
|
|
Thanks but that is a C library.
by that Info it seem that there is no easy way to distribute the files.
The all use some setup system. But I need a simple copy system.
|
|
|
|
|
No, it's not, you need to craete a office add-in. You can create such an add-in in any language. You need to implement some COM interfaces. There are Visual Studio Tools for Office (VSTO), that helps you. Find more informations and downloads here[^]
Reagrds: Didi
|
|
|
|
|
Thanks. I give it a new try
|
|
|
|
|
Hi
XLW allows you write XLLs in VB.NET
Here's a demo clip demonstrating how easy it is to create an xll in C#
Creating a C# XLL with Visual Studio
For VB.NET it would be almost identical.
If your using Visual Studio Express this clip shows you how to debug your C# xll
Debugging a C# XLL with Visual C# Express
You will need to install Visual C++ and Visual VB.NET ( though you don't explicitly use C++, it needs to be installed)
You can download XLW from here xlw4.0.0b0
Hope it helps.
A's Dad
modified on Monday, June 22, 2009 7:37 AM
|
|
|
|
|
Hi,
xlsApp1 = CreateObject("Excel.Application")
after the excution of the above code creates an instance of excel in task manager.
Dim temp As Excel.Workbook
temp = xlsApp1.Workbooks.Open(ExsTemplate & "sheet.xls")
this line is opening an excel template file.
after the excution of above line
i try to open any excel file by double clicking it which is lying in my hard drive.
and results in opening this file - ExsTemplate & "sheet.xls"
and one more thing this opened file , does not create a new instance in task manager.
These are the two problems. both thses files are under one process.
because when i kill this process from task manager, it closes both files.
please help.
|
|
|
|
|
Excel is one process. That's how it works. You can't change it.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
Christian,
Suppose i open ten files, and all these files shall come under one process.
I know the process id. can u tell me how should i find out all the file names pertaining to this process?
Thank You
|
|
|
|
|
xlsApp1.workbooks give you all the info about the open files by your program and others(manualy)
|
|
|
|
|
I need a help, plzzzzzz help me .Iam doing this for last 20 days and everytime i'm getting typical errors.
plz anyone of u, specially MVP Persons help me.
I want to save an image in my access table, iam using vb.net2008 as frontend. there are 10 fields of text, 1 of combobox and 1 of picture box.Its just like a query form along with the phto which i want to save in my access database.
YOur immediate help would be appreciable.
Byee
mirza
|
|
|
|
|
mirzamujib wrote: YOur immediate help would be appreciable.
IMMEDIATE help ? Because we owe you or something ?
This is a trivial task, widely reported on the internet. What have you done to try to solve it ? What errors are you getting ? If you ask questions properly, you will get better answers.
Christian Graus
Driven to the arms of OSX by Vista.
Please read this[ ^] if you don't like the answer I gave to your question.
"! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
|
|
|
|
|
hello Mr.Graus
Actually i really got fedup by searching the procedure of "Saving an image in access" using vb.net2008.
i'm attaching here my code,please find it where iam going error.
Try
Dim conn As New OleDbConnection
Dim cmd As New OleDbCommand
conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Contacts3\mycontacts.mdb;"
conn.Open()
cmd = conn.CreateCommand
cmd.CommandText = "Insert into mycontactstab(TextBox1.Text,TextBox2.Text,TextBox3.Text,TextBox4.Text,picturebox1.image) values(@Email1,@Email2,@Website,@Notes,@Image)"
Try
Dim imgbytearray As Byte
Dim stream As New MemoryStream
Dim bmp As New Bitmap(stream)
bmp.Save(stream, ImageFormat.Jpeg)
imgbytearray = stream.ToString() ''''might be here i'm going wrong'''''
stream.Close()
cmd.Parameters.AddWithValue("@Email1", TextBox1.Text)
cmd.Parameters.AddWithValue("@Email2", TextBox2.Text)
cmd.Parameters.AddWithValue("@Website", TextBox3.Text)
cmd.Parameters.AddWithValue("@Note", TextBox4.Text)
cmd.Parameters.AddWithValue("@Image", imgbytearray)
If DirectCast(cmd.ExecuteNonQuery(), Integer) > 0 Then
Return
End If
Catch ex As Exception
MessageBox.Show(ex.Message)
'Return
End Try
conn.Close()
cmd.Dispose()
conn.Dispose()
Catch ex As Exception
MessageBox.Show(ex.Message)
Return
End Try
|
|
|
|
|
mirzamujib wrote: cmd.CommandText = "Insert into mycontactstab(TextBox1.Text,TextBox2.Text,TextBox3.Text,TextBox4.Text,picturebox1.image) values(@Email1,@Email2,@Website,@Notes,@Image)"
Your seriously need to pickup a beginners book on VB.NET. This single line has a very serious problem in it stems from a lack of understanding of how strings work and how SQL works.
mirzamujib wrote: ''''might be here i'm going wrong'''''
No, you're going wrong in just about that entire code snippet you posted. Seriously, you need to get the basics of the language down first before trying something like this.
|
|
|
|
|
Christian Graus wrote: "! i don't exactly like or do programming and it only gives me a headache." - spotted in VB forums.
LOL. Reading some of the questions gives me a headache.
"There's no such thing as a stupid question, only stupid people." - Mr. Garrison
|
|
|
|
|
1st, let me start by saying that saving an image in Access is a bad idea.
It will be a memory hog and Access only can hold about 1 gb of data.
What you should do is just offer a path to the image and allow that to load when needed. What are your "Typical" errors?
|
|
|
|
|
Hello,
Ya that wil be better if i save a path instead of a picture itself..thnx for ur idea but iam very new to vb.net, wil u please help me to get the code to save the path of an image...
Thnx mindserve....
|
|
|
|
|
Look at
system.io.file
system.io.path
system.io.directory
namespaces
You should be able to figure it out
(saving a path to db is just saving a string)
|
|
|
|
|
Hello Tom
here i''m copying my code,plz have a look on it and suggest me how should i write code for my insert command.
Dim connectionstring As String = "Provider=Microsoft.Jet.OLEDB.4.0;Data
Source=C:\Contacts3\mycontacts.mdb;Persist Security Info=False"
Dim con As New OleDbConnection(connectionstring)
Dim cmd as new OleDbCommand
Try
con.Open()
Dim str As String = "Insert into mycontactstab values ( '" & TextBox6.Text & "','" & TextBox4.Text & "','" & TextBox7.Text & "','" & TextBox10.Text & "','" & TextBox11.Text & "','" & TextBox8.Text & "','" & TextBox9.Text & "',PicureBox1.image)"----(here wht should i write as i took picture box to retrieve and save an image)-----
Dim cmd As New OleDbCommand(str, con)
If cmd.ExecuteNonQuery() Then
|
|
|
|