| . | ![]() |
|
|
Using OLE Servers in Visual Basic 3.0 Introduction I remember meeting with some of the editors from Visual Basic Programmer's Journal a few months ago. They said that even though VB4 was out, interest in VB3 was still hot. And why not? VB3 is still a great development environment. And, it supports OLE Servers with very few problems. Discussion Coding to use OLE Servers from VB3 is very similar to using a VBX control. OLE Servers have properties and methods just like VBX's. The only real difference is how you include an OLE Server in your project - you don't! When you want to use a VBX control, you load it into your project and drop it on a form. To use an OLE Server, you just write a few lines of code like this: Dim idsMail as Object
Set idsMail = CreateObject("IDSMailInterface.Server")
idsMail.ObjectKey = "ABCDE12345"
idsMail.AddRecipientTo "Jim Stevens"
idsMail.AddRecipientCc "Mary Brown, Doug Williams"
idsMail.Subject = "Meeting Agenda"
idsMail.AddAttachment "C:\MEETINGS\AGENDA.DOC"
idsMail.Message = "Here is the agenda for this weeks meeting."
idsMail.Send
idsMail.GetHeaderItems IDSM_ITM_SUBJECT%, theSubjects$(), theCount%
idsMail.MessageIndex = 1
singleSubject$ = idsMail.GetHeaderItemString (IDSM_ITM_SUBJECT%)
which would return the subject of a single message. To get all of the subjects, we would loop through for all the messages, getting the subjects one at a time. Not a big deal. Starting the Server
|
© 1993-2010, AssurX, Inc. All Rights Reserved. Trademarks. 408-778-1376 | email: info@intuitive-data.com |
|