|
Hi all i want to send the Email using VB6 but without using the Outlook Application how could i do that plz reply with code.
with regards
yogesh agarwal
|
|
|
|
|
look up either cdonts or cdosys dlls
|
|
|
|
|
Thanks for your reply but i tried a lot i could n't find the method how to use these DLL in my VB program to send the email could you help me out.
with regards
yogesh agarwal
|
|
|
|
|
Keep digging....
CDOSYS.dll
http://support.microsoft.com/kb/310212
CDONTS.dll
http://www.2enetworx.com/dev/projects/view.asp?ids=1,67,2
|
|
|
|
|
Check out Blat.
This is a freeware mail program that is command line driven - so you should be able to quite easily integrate it into your code.
I use this to automatically send out emails to suppliers notifying them of payment transfers.
You always pass failure on the way to success.
|
|
|
|
|
Thanks for your reply but i tried a lot i could n't find the method how to use the BLAT in my VB program to send the email could you help me out.
with regards
yogesh agarwal
|
|
|
|
|
I'm okay helping you with specific questions.
As a hint - you will need to use the shell to execute the blat commands as it is command line driven.
I don't consider just over one and a half hours, between my post and your reply, as worthy of the phrase:
yogesh_kumar_agarwal wrote: tried a lot .
Beyond this please be more specific with where you are stuck.
You always pass failure on the way to success.
|
|
|
|
|
If you were using VB.NET, this would be trivial. The other option that sprngs to mind is MAPI ( which can use outlook express, I belive ), but I have no idea if VB6 supports it in any way.
Christian Graus - Microsoft MVP - C++
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
With the help of Pete (earlier post) I am able to read & display return lines then close a process through command line (MS-DOS window) with the following codes:
<br />
Dim ps1 As New Process<br />
<br />
ps1.StartInfo.FileName = "cmd.exe"<br />
ps1.StartInfo.WindowStyle = ProcessWindowStyle.Normal<br />
ps1.StartInfo.CreateNoWindow = False<br />
ps1.StartInfo.UseShellExecute = False<br />
ps1.StartInfo.RedirectStandardOutput = True<br />
ps1.StartInfo.RedirectStandardInput = True<br />
ps1.Start()<br />
<br />
Dim s1 As String<br />
<br />
Dim sIn As StreamWriter = ps1.StandardInput<br />
Dim sOut As StreamReader = ps1.StandardOutput<br />
sIn.AutoFlush = True<br />
sIn.Write("dir/p" & System.Environment.NewLine)<br />
<br />
Thread.Sleep(100)<br />
s1 = sOut.ReadLine<br />
ps1.Kill()<br />
<br />
ListBox.Items.Clear()<br />
<br />
'// *** Display every return line *** //<br />
While s1 <> "End of Line"<br />
ListBox.Items.Add(s1)<br />
s1 = sOut.ReadLine<br />
End While<br />
<br />
ListBox.Items.Add(s1)<br />
However, if the process does not stop then the ListBox can not update data (I think because the process takes more priority then the ListBox?)
1. Can we modify the above codes so that we can update the ListBox without waiting the process completed?
2. If it is not possible ... is there another way to do it?
Thanks for any help!
|
|
|
|
|
ATC wrote: Thread.Sleep(100)
s1 = sOut.ReadLine
ps1.Kill()
I love how you wait one tenth of a second, read a single line of it's output, and then kill the process, whether it's doing something or not. Then you continue and try and read lines from a process you already killed off. You cannot do that. The process object must stay running in order for you to read from it's output stream.
ATC wrote: However, if the process does not stop then the ListBox can not update data
This is because the UI thread is running the code to read the output stream from the process. Until the read operation and filling of the ListBox is done and your code goes idle again, you're controls cannot repaint themselves because the thread is busy doing other things.
ATC wrote: I think because the process takes more priority then the ListBox?)
Priority has nothing to do with it. Threading does.
ATC wrote: 1. Can we modify the above codes so that we can update the ListBox without waiting the process completed?
You cant read hasn't has been output, so no. You have to wait for the process to finish. If by this statement you mean that you want the control to repaint itself and continue to fill the ListBox with data, you either have to move the code that reads the output stream to another thread, or you have to read the output stream asynchronously.
|
|
|
|
|
Hi Dave
Now I undestand more about my problem. I will try to do as you mentioned
Many thanks
|
|
|
|
|
Would background workers fit in this solution? If not, why?
|
|
|
|
|
Sure. BackgroundWorker is just a wrapper for a pool thread. It'll do the job just as easily.
|
|
|
|
|
Hi,
AFAIK the general solution that will cope with both stdout and stderr, no matter how much
data is expected, requires several threads:
- one thread (other than the GUI thread) that reads lines (not ReadToEnd) from stdout
- one more thread (other than the GUI thread) that reads lines from stderr
- the necessary Control.InvokeRequired and Control.Invoke() stuff to let them access
your GUI
- and maybe yet another thread that waits for the process to terminate (if that is
relevant to your app).
And even when you program it according to the documentation (study it!) you will
find it difficult to get it to work properly on Win95/98/Me (IIRC that's how it used to be
on .NET 1.0/1.1 anyway).
Luc Pattyn [Forum Guidelines] [My Articles]
this months tips:
- use PRE tags to preserve formatting when showing multi-line code snippets
- before you ask a question here, search CodeProject, then Google
|
|
|
|
|
Hi Luc
I will learn more all about your mention
Thanks
|
|
|
|
|
Hi I need to perform drag and drop between 2 datagridviews containing the same type of information? I want to drag and drop the entire row not just a cell value. If the user drags and drops a row from the source onto a row in the target then I want the fields to be updated please help... cant find anything online so far?
Mr Oizo
|
|
|
|
|
Drag and drop isn't exactly the easiest thing to understand. Newbie's to it get really confused about which side is supposed to be handling what, what Effects are, how to get the data out of the event args, what Data Formats are, how data is even represented in the operation. In your case, your doing it all inside your own app.
Learn the basics of drag and drop first before you start applying it to your DGV's and posting up DataGridRows into the operation. Start with creating a ListView that is a drop target and can take files dragged to it. Drop a ListView on a form and enable it's AllowDrop property.
Private Sub ListView1_DragDrop(ByVal sender As Object, ByVal e As System.Windows.Forms.DragEventArgs) Handles ListView1.DragDrop
If e.AllowedEffect And DragDropEffects.Copy = DragDropEffects.Copy Or _
e.AllowedEffect And DragDropEffects.Move = DragDropEffects.Move Then
Dim items As String() = DirectCast(e.Data.GetData(DataFormats.FileDrop, True), String())
For Each item As String In items
Dim lvItem As New ListViewItem(item)
ListView1.Items.Add(item)
Next
End If
End Sub
This is just the Drop side of a Drag and Drop. Once you completely understand every line of this code, you can start experimenting with starting your own Drag.
Why all this step-by-step crap?? Because it's what confuses everyone who starts out. They can't keep the two sides of a Drag and Drop straight in their head, and therefore can't keep it straight in their code either.
|
|
|
|
|
Hi All!
I am writing plugin to outlook 2003.
I want to add to main toolbar "button with menu",
such as button "New" and "Send\Receive".
But I can not find examples how to do it.
Please, suggest me the way for solving my task.
Best regards,
Nikolai
PS: language: vb6
|
|
|
|
|
Hi
I am trying to catch the user's internet web traffic. If I can catch the web traffic, I want to block the user seeing the site.
Please send me your recommendations.
thanks in advance
Cemal
|
|
|
|
|
Possible solutions:
* Set up a proxy server and flow all traffic through that.
* Create an NDIS driver which blocks the packets as they flow in and out of the network card.
|
|
|
|
|
So which one of us got him??
I think I shot him first from right over there ---->
|
|
|
|
|
This is called a proxy server. You don't "intercept" the traffic on the client machine. The client machines browser asks a proxy to go get a page from a URL for it. The proxy server implements the rules as to which wites are OK and which are not.
|
|
|
|
|
Just write an ACL to filter websites...
|
|
|
|
|
thank you very much for trying to help me;
however, I do not want to create proxy server.
I need a way to do this from vb.net. I will go ahead and reserach what is ACL is.
thank you all for trying.
|
|
|
|
|
addhandler is a class?
Soniagupta1@yahoo.co.in
Yahoo Messenger Id = soniagupta1
|
|
|
|