Quantcast
Channel: VBForums - CodeBank - Visual Basic 6 and earlier
Viewing all 1461 articles
Browse latest View live

[VB6] DirectX 11 for VB6 1.0 Type Library


[VB6] Convert a picture to PNG byte-array in memory

$
0
0
This WIA sample converts an StdPicture to a PNG byte-array without using any temporary disk storage.

Shows how to use IPicture.SaveAsFile method with plain ADODB.Stream (no CreateStreamOnHGlobal API used).

Code:

Option Explicit

Private Sub Form_Load()
    Debug.Print UBound(SaveAsPng(picTab1.Picture))
End Sub

Public Function SaveAsPng(pPic As IPicture) As Byte()
    Const adTypeBinary As Long = 1
    Const wiaFormatPNG As String = "{B96B3CAF-0728-11D3-9D7B-0000F81EF32E}"
    Dim oStream    As Object ' ADODB.Stream
    Dim oImageFile  As Object ' WIA.ImageFile
   
    '--- load pPic in WIA.ImageFile
    Do While oImageFile Is Nothing
        Set oStream = CreateObject("ADODB.Stream")
        oStream.Type = adTypeBinary
        oStream.Open
        Call pPic.SaveAsFile(ByVal ObjPtr(oStream) + 68, True, 0) '--- magic
        If oStream.Size = 0 Then
            GoTo QH
        End If
        oStream.Position = 0
        With CreateObject("WIA.Vector")
            .BinaryData = oStream.Read
            If pPic.Type <> vbPicTypeBitmap Then
                '--- this converts pPic to vbPicTypeBitmap subtype
                Set pPic = .Picture
            Else
                Set oImageFile = .ImageFile
            End If
        End With
    Loop
    '--- serialize WIA.ImageFile to PNG file format
    With CreateObject("WIA.ImageProcess")
        .Filters.Add .FilterInfos("Convert").FilterID
        .Filters(.Filters.Count).Properties("FormatID").Value = wiaFormatPNG
        SaveAsPng = .Apply(oImageFile).FileData.BinaryData
    End With
QH:
End Function

JFYI, the magic offset 68 is the difference between ObjPtr of IUnknown and IStream casts of an ADODB.Stream instance.

Using Picture property on WIA.Vector converts all StdPicture subtypes (like Enhanced Metafiles or Icons) to vbPicTypeBitmap because WIA's Convert filter fails on anything but a serialized vbPicTypeBitmap 32bbp image it seems.

cheers,
</wqw>

[VB6] VBTixyLand Control

$
0
0
https://github.com/wqweto/VBTixyLand

This is a remake of https://tixy.land/



This is using IActiveScript without typelib to host the expressions evaluator in Chakra JS engine.

I plan on using smaller 8x8 ones as progress indicators, changing shape on each operation as a bit of entertainment (or inspiration) for the mostly bored end-users of our products.

Enjoy!
</wqw>
p.s. Note that JScript does not implement exponentiation operator so you have to use Math.pow (or pow only) instead.

Paint PNGs via DrawIconEx()

$
0
0
Use WIA 2.0 and an ImageList to load a PNG file as a StdPicture. Then draw using DrawIconEx(), which seems to hold the alchemy here.

Code:

Option Explicit

Private Const WIN32_NULL As Long = 0

Private Enum DI_FLAGS
    DI_MASK = &H1&
    DI_IMAGE = &H2&
    DI_NORMAL = &H3&
    DI_COMPAT = &H4&
    DI_DEFAULTSIZE = &H8&
    DI_NOMIRROR = &H10&
End Enum

Private Declare Function DrawIconEx Lib "user32" ( _
    ByVal hDC As Long, _
    ByVal xLeft As Long, _
    ByVal yTop As Long, _
    ByVal hIcon As Long, _
    ByVal cxWidth As Long, _
    ByVal cyWidth As Long, _
    ByVal istepIfAniCur As Long, _
    ByVal hbrFlickerFreeDraw As Long, _
    ByVal diFlags As DI_FLAGS) As Long

Private PngAsIcon As StdPicture
Private WidthPx As Long
Private HeightPx As Long
Private Coords As Collection

Private Sub Backdrop()
    Dim I As Single

    For I = 0 To ScaleWidth Step ScaleX(15, vbPixels)
        Line (I, 0)-(I, ScaleHeight), &HC0E0C0
    Next
    For I = 0 To ScaleHeight Step ScaleX(15, vbPixels)
        Line (0, I)-(ScaleWidth, I), &HFFC0C0
    Next
End Sub

Private Sub DrawCenteredAt(ByVal X As Single, ByVal Y As Single)
    DrawIconEx hDC, _
              ScaleX(X, ScaleMode, vbPixels) - WidthPx \ 2, _
              ScaleY(Y, ScaleMode, vbPixels) - HeightPx \ 2, _
              PngAsIcon.Handle, _
              WidthPx, _
              HeightPx, _
              0, _
              WIN32_NULL, _
              DI_NORMAL
End Sub

Private Sub Form_Load()
    With New WIA.ImageFile
        .LoadFile "GlassBall.png"
        WidthPx = .Width
        HeightPx = .Height
        ImageList1.ImageWidth = WidthPx
        ImageList1.ImageHeight = HeightPx
        ImageList1.ListImages.Add , , .FileData.Picture()
    End With
    Set PngAsIcon = ImageList1.ListImages.Item(1).ExtractIcon()
    ImageList1.ListImages.Clear
    Set Coords = New Collection
    BackColor = &HF0F0FF
    DrawWidth = 2
End Sub

Private Sub Form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
    DrawCenteredAt X, Y
    Coords.Add Array(X, Y)
End Sub

Private Sub Form_Resize()
    Dim Coord As Variant
   
    If WindowState <> vbMinimized Then
        Cls
        Backdrop
        For Each Coord In Coords
            DrawCenteredAt Coord(0), Coord(1)
        Next
    End If
End Sub

Name:  sshot.png
Views: 136
Size:  11.7 KB
Attached Images
 
Attached Files

VB6 Implementing Hierarchies via multiple Interfaces

$
0
0
This is an implementation of the following schema:


Leaving out "Faculty" (and the Nodes below "Faculty")...
So, the deepest Hierarchy-Structure in the Demo is:
CommunityMember (implementing no interface, it's the most common "base-class")
--- Employee (implementing cCommunityMember)
------ Staff (implementing cCommunitMember, as well as cEmployee)

The "construction" (or better: initialization) of new Class-Instances is (for all Entities) solved via a:
Friend Sub Init(<several InitParams>, ...)

To keep the example simple - I've not bothered with proper "Plural-Classes" (ListClasses [as e.g. cStudents]) -
which then would contain the typical internal Collection, a Count-Property, an Add-method, and an Item-Method (e.g. returning an instance of cStudent)...

Instead these Collection-Classes are defined directly in the Form (as e.g. Private mStudents As Collection) -
accompanied (also directly in Form-Code) by appropriate AddNewStudent(...)-functions.

Well, there's not much more to explain - the example is relatively simple to understand ...
Although it contains a lot of Classes, the Code-Volume per Class is small (only sporting very few Properties per Class).

Here's the Demo-Zip:
ImplementsHierarchy.zip

Have fun,

Olaf
Attached Files

vbLibCurl

$
0
0
Did a little more work around Jeffrey Phillips 2005 vblibcurl

- initLib() to find/load C dll dependencies on the fly from different paths
- removed tlb requirements (all enums covered but not all api declares written yet)
- added higher level framework around low level api
- file progress, response object, abort
- download to memory only or file
- file downloads do not touch cache or temp

You will still need the 2 open source standard C dlls: libcurl.dll, vblibcurl.dll

https://sourceforge.net/projects/lib...url.vb%201.01/

still more that could be done/cleaned up but this is all i need for now
and my keystrokes are limited

repo for this: https://github.com/dzzie/libs/tree/master/vbLibCurl

edit:
for it to work with newer ssl servers you will need to update the 15yr old libcurl.dll. Its just a drop in replacement
you will want the 32 bit version from here: https://curl.se/windows/

You will also need the matching 32 bit openssl libaries: https://curl.se/windows/dl-7.73.0_1/...in32-mingw.zip
Attached Files

(VB6) Replicate control interface or encapsulate control into UserControl

$
0
0
This a tool intended to ease the work of recreating the interface of a control.

It creates a *.ctl file with all the basic code.

It has two options:
1) Encapsulate the control into the UserControl
2) Just replicate the interface.

Name:  RepInt.png
Views: 59
Size:  8.4 KB

You need to add the control that you want to replicate/encapsulate inside that zone.
Also select the proper file from where it comes from (usually an OCX file) or leave with "VB6.olb" for intrinsic VB controls.

Notes:
1) For the ones that do not want to write to the registry comment the two SaveSettings lines.

2) If the control has properties or methods that are named with VB reserved words, you'll need to manually change/fix that.

3) Also if there are properties that has indexes, you'll have to manually finish the code for storing them (ReadProperties/WriteProperties).

4) In the *.ctl file there are saved attributes of the members of the original control, if you copy and paste the code to another UserControl you'll lose them.

5) Some properties or parameters that are defined "As Object" may need to be changed to the proper data type, for example "As RecordSet".
Attached Images
 
Attached Files

VB6 Unicode-capable ADO-DataBinding-Control

$
0
0
Not sure, whether some of you have run into this, but the MS-ADODC-Control does not support Unicode when linked to Control-Bindings.

So the 3 Binding-Controls in this Demo can be seen as an Unicode-aware Replacement:
- not only for the ADODC-Control (represented by ucBindingNav)
- but also for a Scrollable-DetailView-Container (which hosts Bound-Control-entries "PropertyGrid-like")

Perhaps a ScreenShot explains better, what the Main-Control (ucBindingCont) does:


In this example, the ucBindingCont(ainer) fills the Form in its entirety,
and is the only Control one has to create on the given Form.

The ADODC-like Navigation-Bar at the Bottom of the Screenshot (ucBindingNav) is internally part of that ucBindingCont.ctl.

The approach needs a Unicode-library (for the Controls which are bound to ADO-Rs later),
and it should work with any decent Unicode-Control-lib, like e.g. the OCXes which are available from:
- CyberActiveX
- CodeJock
- or Krools OCX-version
Note, that neither Control-Lib has to offer special DataSource/DataField Props on their Controls -
the Binding-implementation here will not require these (they will be ignored, even if they do exist).

In this Demo I was making use of Krools latest OCX-Version (VBCCR17), which is therefore a prerequisite -
(which one has to download and register, before running this Demo-Project makes any sense).

Note, that the Conrols of the Unicode-lib one wants to use - are instantiated (and later accessed) in a LateBound fashion,
for that to work - only their ProgIDs have to be defined (for each of the Control-Types which make sense) - here's the ones for Krools lib:
Code:

Const TxtCtlProgID = "VBCCR17.TextBoxW"
Const CmbCtlProgID = "VBCCR17.ComboBoxW"
Const DatCtlProgID = "VBCCR17.DTPicker"
Const ChkCtlProgID = "VBCCR17.CheckBoxW"

With these Constants in place, the Definition which creates the Binding-View (as seen in the ScreenShot) is this:
Code:

Private Sub CreateBoundControlsView(RsUnicode As ADODB.Recordset, RsLanguages As ADODB.Recordset)
  With ucBindingCont1 'the dynamic adding + binding of Controls (all LateBound, using the above ProgID-Consts)
    .Visible = False  'we hide the Binding-Container here, to avoid Flickering during Control-(Re-)Adds
      .SetTitle "ADO.Rs-Binding to UniCode-Controls"
         
          .AddBoundCtlFor "Welcome", TxtCtlProgID, "Change", "Text", "a longer Unicode-Welcome-ToolTip with chinese Chars: " & ChrW(&H6B22) & ChrW(&H8FCE)
          .AddBoundCtlFor "Country", TxtCtlProgID, "Change", "Text", "ToolTip for the Country-Field"
          .AddBoundCtlFor "Capital", TxtCtlProgID, "Change", "Text", "ToolTip for the Capital-Field"
          .AddBoundCtlFor "Checked", ChkCtlProgID, "Click", "Value", "ToolTip for the Checked-Field"
          .AddBoundCtlFor "SomeDate", DatCtlProgID, "Change", "Value"
          .AddBoundCtlFor "Language", CmbCtlProgID, "Click", RsLanguages '<- instead of a ValuePropName, we pass an FK-Rs to our ComboCtl
     
      Set .DataSource = RsUnicode 'finally we set the DataSource to our Main-Rs, to bring the Bindings to life
    .Visible = True 'reset the hidden-state of the Container
  End With
End Sub

The magenta-colored Comment above describes, what is needed for an automatic "ForeignKey-Combo-DropDown-Binding".
So, a Binding-Def-CodeLine requires the following Parameters:
- the Rs-FieldName in the first Parameter (when no explicit Caption is set, these FieldNames will provide also the Labeling in the View)
- the ProgID (for Control-Creation... above marked in blue, as defined in our Consts)
- the Name of the Control-Event, which tells us about a Value-change in the Control (often "Change", but sometimes "Click" or whatever)
- the Name of the Value-Property of the Control, we will bind the Rs-Value to later on
- and finally an optional ToolTip-Text, followed by an optional FormatString argument

That's it (basically) to create a nice looking Data-Entry-Form (or -View)...
For full CRUD-operation-support (Create, Read, Update Delete) via the Bottom-NavBar, only one EventHandler has to be implemented:
Code:

Private Sub ucBindingCont1_NavButtonClick(ByVal BtnType As eNavButtonType, CancelClickEvent As Boolean)
  On Error Resume Next
  With ucBindingCont1.DataSource  'we just call the matching Methods of our DataSource (of type ADODB.Recordset)
    Select Case BtnType          'in a real App one might want to throw some MessageBoxes like "Do you really want to save" at the User
      Case navBtnRequery: .Requery
      Case navBtnDelete:  .Delete
      Case navBtnAddNew:  .AddNew
      Case navBtnSave:    .UpdateBatch
    End Select
  End With
  If Err Then MsgBox Err.Description: Err.Clear
End Sub

For usage in your own Projects, only the 3 UserControls (ucBindingCont, ucBindingNav and ucBindingEntry)
have to be included (directly as Private UserControls - they are small enough - and use no SubClassing or some such).
Other than the ADO-reference (which is obvious when we use ADO-Bindings) no other dependency is needed.

Well, I hope the above explanations were clear enough to get you started, here is the Demo-Zip:
BindingDemo.zip

Have fun,

Olaf
Attached Files

EMail validator (MX, and existing email)

$
0
0
I had to validate several thousand of emails, and as quickly as possible.
I couldn't find anything on the internet that was free and easy to use.
So I wrote a small program that validates emails (you should adapt to your needs with a DB of course).

The tool uses tst10 (http://support.moonpoint.com/downloa...lnet/tst10.php)
which takes care of the telnet part.
Then the result is analyzed to determine whether the email is existing or not.

There is certainly a way to improve it, but it gets the job done.

Thierry

EMailValidator.zip
Attached Files

Send easily SMS with your mobile, 1 by 1 or per batch

$
0
0
Sometimes I need to send quite a lot of SMS.
You have 2 options :
- Use online web services
- Use your mobile

Using your mobile is cheaper.

I spent a lot of time to find the best solution and this class, is the best solution (if you have an Android mobile)

The class in the zip file is a wrapper on the fantastic free MyPhoneExplorer : https://www.fjsoft.at/en/downloads.php
Quote:

Simply explore your Android phone !

Connect your phone via WiFi, cable or bluetooth and you'll be surprised how easy and efficient it will be to manage your phone with our software. Since it's first release MyPhoneExplorer evolved into the most popular freeware tool for smartphones. The software is constantly updated with new features.

Features:

Adressbook - with direct sync to Outlook, Windows contacts, Thunderbird, SeaMonkey, Lotus Notes and Tobit David
Organizer with calendarview and direct sync to Outlook, Sunbird, Thunderbird, SeaMonkey, Windows calendar(Vista), Rainlendar, Lotus Notes, Tobit David and net shared calendars (WebDAV, FTP, local)
SMS - send, manage, archive, export, import, excessive messages,...
Filebrowser with cachesystem to minimize datatransfer, automatic photosync...
and much more. f.e.: calllists, control phone, memorystatus, phonemonitor,...
With the class, you can send SMS 1 by 1 or in batch mode.

The class uses the free MyPhoneExplorer that connect your

Don't forget to add the country code in front of the mobile number.

Enjoy,

Thierry

SendSMS.zip
Attached Files

VB6 (RC6) Slider-Widget with Auto-Vert/Horz-Switching

$
0
0
Just a simple Demo, which shows an efficient Slider-Control implementation.
(about 70 Lines of code in cwSlider).

Also included is a Demonstration for "visual inheritance" (of cwSlider in cwSliderFish)... don't ask... ;)

Here's a ScreenShot:


And here the Demo-Code for this initial version:
SliderWidget.zip

Edit (a newer version v2 is available in the Link below):
- fixed a few Rendering-glitches with higher Zoom-Factors
- the cwSlider.cls is now able, to render the thumb from User-ImgResources as well (by setting a Widget.ImageKey)
- placed a few more comments in the surrounding Demo-App
SliderWidget_v2.zip



Have fun,

Olaf
Attached Files

Another json solution written for VB6

$
0
0
The code below has two classes, a JsonArray and a JsonObject, so we can make json objects starting from an object or an array. Parser included in both objects. Also the parser isn't recursive. The JsonObject is based on an older class named FastCollection, which use an array of a UDT and another hash array, using the HashData function of shlwapi library.

We can build a json structure, applying values, or by using a path. Also we can retrieve or update a value (and change to anoher type if we wish), using a path.
Code:

Dim k As New JsonObject
k.AssignPath "hello.0.one.3", 500
Debug.Print k.Json(4)

We get this. Array is zero based. So 3 in the path above is the fourth item
Code:

{   
    "hello" : [       
        {           
            "one" : [               
                null,
                null,
                null,
                500
            ]
        }
    ]
}

We can put null using k.nullvalue, or for arrays as in the example above, when we place an item above upper bound. For arrays, we can insert a number null values moving items up, and we can delete an number of items.
We can use the path to update the value using AssignPath statement, and we can use another format:
Code:

Dim kK as New JsonArray
kk.AssignPath "1-1-1-0", kk.anArray(0, 500), "-"
Debug.Print kk(1)(1)(1)(0)(0)  ' 500
kk(1)(1)(1)(0)(0) = 8000
Debug.Print kk(1)(1)(1)(0)(0)  ' 8000

We can mix JsonObjects with JsonArrays because the basic statements are the same (like a common interface).
So we can use something like this:
Code:

Debug.Print k("other key")(0)("one3")(1)
I didn't use a collection, because my fastcollection uses a hash table which is fast without using the one error statement to handle the finding procedure.

We can store any numeric type (stored on a Variant array), boolean, null, and the two objects, the JsonObject and the JsonArray. Parsing handle escape characters, and the json property render the the structure to string changing the string using escaped characters. The null value is the VBEmpty.

George

- Removing the mistake "/" with the backslash "". Thanks to wqweto, who check it.

Version 3 uploaded
Attached Files

SqLite3 Win10 Demo - Using winsqlite3.dll

$
0
0
I found some work about the using of winsqlite3.dll, in VBA for Excel, and was not completed. First I did some changes for using it in VB6. I did some checks and found some errors i the old implementation. Finally I made a demo using the Sqlite3, to make an in memory db, using ":memory:" and not a filename in the creation call.
The demo show how to handle blob, and the error messages (which the old example was wrong, had missing the free procedure for the error message pointer)

This example run on a Windows 10 os. The winsqlite3.dll exist and didn't need reference to it.
The first line in the form is the error message for checking the code.

Also I have a module to write unicode lines to form



Name:  sqlite.png
Views: 44
Size:  9.3 KB
Attached Images
 
Attached Files

hey. i uploaded a new power programing langugae which can compile vb6 projects

Property Bag alternative - Data Bag

$
0
0
Property Bag alternative - Data Bag Class
This is an alternative to Property Bag class. It supports all variable types except vbObject, vbDataObject and vbUserDefinedType.
(For the vbVariant , it now only supports byte array.) The advantage is its portability. It has all methods same as Property Bag class.
Supported types:
  • vbEmpty
  • vbNull
  • vbInteger
  • vbLong
  • vbSingle
  • vbDouble
  • vbCurrency
  • vbDate
  • vbString
  • vbBoolean
  • vbVariant(used only byte array)
  • vbDecimal
  • vbByte


DataBag.cls

Usage:

Code:

Dim DB As New DataBag
    DB.WriteProperty "test", "ok"
    DB.WriteProperty "init", True
        Dim b() As Byte
            ReDim b(2)
            b = StrConv("ASD", vbFromUnicode)
    DB.WriteProperty "byte array", b
    DB.WriteProperty "date value", Now()
    DB.WritetoFile App.path & "\testDB.txt"
    Set DB = Nothing
    Set DB = New DataBag
    DB.ReadFromFile App.path & "\testDB.txt"
    Debug.Print StrConv(DB.ReadProperty("byte array"), vbUnicode)
    Debug.Print DB.ReadProperty("init")
    Debug.Print DB.ReadProperty("test")
    Debug.Print DB.ReadProperty("date value")
    Debug.Print DB.ReadProperty("nothing", Null)
'    Debug.Print DB.ReadProperty("nothing")' raises an error same as Property Bag

'DB.Contents ' Same as  Property Bag

Attached Files

Property Bag alternative - Data Bag Version 2

$
0
0
Property Bag alternative - Data Bag Version 2 Class
This is an alternative to Property Bag class. It supports all variable types except vbObject, vbDataObject and vbUserDefinedType.
(For the vbVariant , it now only supports byte array.) Now supports JSON. It has all methods same as Property Bag class.
Now I optimized the class for maximum performance. I tried different for speeding up such as hashing, binary sorting and insertion. Attached Project has a comparison
of Property Bag, Collection , Dictionary etc.
Supported types:
  • vbEmpty
  • vbNull
  • vbInteger
  • vbLong
  • vbSingle
  • vbDouble
  • vbCurrency
  • vbDate
  • vbString
  • vbBoolean
  • vbVariant(used only byte array)
  • vbDecimal
  • vbByte


Name:  SS.jpg
Views: 23
Size:  35.0 KB

Demo Application :
DataBagV2.zip
Attached Images
 
Attached Files

Stop Watch Demo

$
0
0
This is my attempt at a stopwatch. Its not perfect, but seems to work okay. Looks good though. Any improvements/ suggestions you make will be appreciated.Attachment 179503Attachment 179504
yokesee updated Now you can set a time .hope is what you where looking for .
Attached Images
 
Attached Files

Make Pallette from Picture

$
0
0
Makes a 16 x 16 color palette from a picture you load. DISCLAIMER: it may not catch all colors because of the way I take the samples. Maybe someone can come up with a better way .update to code.
Attached Images
 
Attached Files

Data Bag Version 2 with JSON support

$
0
0
Property Bag alternative - Data Bag Version 2 Class
This is an alternative to Property Bag class. It supports all variable types except vbObject, vbDataObject and vbUserDefinedType.
(For the vbVariant , it now only supports byte array.) Now supports JSON. It has all methods same as Property Bag class.
Now I optimized the class for maximum performance. I tried different for speeding up such as hashing, binary sorting and insertion. Attached Project has a comparison
of Property Bag, Collection , Dictionary etc.
Supported types:
  • vbEmpty
  • vbNull
  • vbInteger
  • vbLong
  • vbSingle
  • vbDouble
  • vbCurrency
  • vbDate
  • vbString
  • vbBoolean
  • vbVariant(used only byte array)
  • vbDecimal
  • vbByte


Name:  SS.jpg
Views: 26
Size:  35.0 KB

Demo Application :
DataBagV2.zip
Attached Images
 
Attached Files

JACMail4 with TLS 1.3

$
0
0
This version of JACMail supports TLS 1.3. This project became necessary when my ESP (Email Service Provider) decided to utilize the Gmail platform. Although a small portion of TLS 1.2 supports Forward Secrecy, TLS 1.3 was chosen because that is all it supports, thereby making it safer and easier to implement on its own (no stored keys). Please be aware that, although the JACMail program is very mature, this particular version has undergone limited testing and may contain bugs. Feedback is welcome.

Gmail & others enforce the use of TLS on their platform. They say that it makes your email more secure, but as the name (Transport Layer Security) suggests, it only protects your email during a single transport leg. Not all MTAs (Mail Transport Agents) support it, and mail is stored on the servers unencrypted. The only way to truly protect your email is end-to-end encryption, but not having access to the email contents would make spam filtering next to impossible. To be truly secure requires end-to-end encryption and enforced sender authentication. The primary purpose of TLS in this situation is to make it difficult for hackers to learn your password (difficult but not impossible).

JACMail does not support HTML directly, but offers a single click export to your default browser for viewing. Virtually all malware and most spam is distributed using HTML because HTML offers executable scripts. JACMail does support attachments and spell checking.

SMTP (Simple Mail Transport Protocol) and POP (Post Office Protocol) are two of the few protocols left that still use ASCII. However, since they now require encryption, byte arrays must be used and converted to strings where necessary.

Setting up an email account can be a bit challenging at times. To make it easier, routines have been provided to test POP3 on port 995 and SMTP on port 465. JACMail does not support port 587 (STARTTLS). For Gmail, the easiest way to begin operation is to allow less secure apps. I haven't looked into it yet, but 2FA (2 Factor Authentication) should also be possible.

JACMail uses IP Version independent Winsock2 system calls, so it will only work on Windows systems that actively support both IPv4 and IPv6. In addition, because it requires TLS 1.3, it is more or less restricted to Win 8.1 and Win 10. The following standard support files are necessary:
MSADODC.OCX
COMDLG32.OCX
MSDATGRD.OCX
Inked.dll
MSBIND.DLL
Inked.oca
msado15.dll
RICHED20.dll

The first time JACMail is run, it will look for the Access Database (JACMail4.mdb) in the current User directory (C:\Users\Username\JACMail4\). If \JACMail4\ does not exist, it will create it as well as a sub-directory called "\Attach". It will then prompt the user to copy the supplied blank database "JACMail4.org" to JACMail4.mdb. It will then create the DSN necessary to access the database.

JACMail comes with 4 tables (InBox, OutBox, Archive, & Dummy). The Dummy table is used to allow you to create different Mail Boxes that mail can be transferred to, using the Menu item "New Mailbox".

An online Help file is available by clicking on the "Online Help" menu item. Although it is for an older version, from a user's perspective it is essentially the same. The big difference is in the Setup. The image below shows some typical settings for a Gmail account.

When checking for mail, you are prompted to enter the password. This is done once per session so that you don't forget the password. Gmail requires sender authentication as well. When you enter the SMTP Password, a Base64 encoded User/Password string is saved, and that is why the Password field appears blank. Note that you don't have to use the same account for both POP3 and SMTP. I would be doing this myself, but my third party supplier does not support TLS 1.3 yet.

J.A. Coutts
Attached Images
 
Attached Files
Viewing all 1461 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>