Customizing JBN2
"Magic Button"

Why....
JBN2 allows to look at the decyphered message in the bottom part of the "View Mail" Pane.
"Magic Button" allows to display that info within your favorite Mail Client,
    with all the bells and whistles it has.
Specifically:
     Hyperlinks are active, and you may just click them to acces referenced WWW pages
     Attachements might look better too
     HTML mail is properly viewed
Restriction: It works only if yor mail client can be invoked double-clicking an .EML file.
    Outlook Express
    Agent in a near future.
Not an issue:
    Security breaches (nasty javascript...) which go with HTML-capable readers are not an issue:
        you view your mail through the (safe) JBN "View Mail" Pane first
        if the mail is safe and if you have the use of it, you press the "magic button" to invoke your HTML-capable-reader.
You get the best of both worlds.
Final Result looks like this: ScreenShot from JB2_MagicButton
Where to peep ?
You will have to act on 2 places:
   Registry
   Viewer.frm


Registry
You want to get the following result:
    Double-clicking on a .ML1 file will invoke Outlook Express just the same as on an .EML extension.
You might
    Forage in the "File Types" to declare the .ML1 extension and attach it to Outlook Express.
    Declare an "open" action
    Attach "C:\PROGRAM FILES\OUTLOOK EXPRESS\MSIMN.EXE" /eml:%1
Or just use the following .REG file which does just the same job:

REGEDIT4

[HKEY_CLASSES_ROOT\ml1file]
@="File ML1 (JBN)"
"EditFlags"=hex:00,00,00,00

[HKEY_CLASSES_ROOT\ml1file\Shell]
@=""

[HKEY_CLASSES_ROOT\ml1file\Shell\open]

[HKEY_CLASSES_ROOT\ml1file\Shell\open\command]
@="\"C:\\PROGRAM FILES\\OUTLOOK EXPRESS\\MSIMN.EXE\" /eml:%1"

[HKEY_CLASSES_ROOT\ml1file\DefaultIcon]
@="C:\\PROGRAM FILES\\OUTLOOK EXPRESS\\MSIMN.EXE,2"

Viewer.frm
You need to create a button
with a name "cmdView"
        at the left of the "Recycle Bin" button
        with your favorite icon on it
Create it manually, copying size and everything else from nearby cmdTrash
Generated code will look like this:

Begin VB.Frame fraMessage
   BorderStyle = 0 'None
   Caption = "Frame1"
   Height = 4932
   Left = 0
   TabIndex = 5
   Top = 1680
   Width = 8556
   Begin VB.CommandButton cmdView
      DisabledPicture = "Viewer.frx":0442
      Height = 372
      Left = 5880
      MaskColor = &H00000000&
      MouseIcon = "Viewer.frx":0664
      Picture = "Viewer.frx":07B6
      Style = 1 'Graphical
      TabIndex = 26
      TabStop = 0 'False
      Top = 0
      UseMaskColor = -1 'True
      Width = 492
   End

   Begin VB.CommandButton cmdTrash
      DisabledPicture = "Viewer.frx":0AC0
      Height = 372
      Index = 0
      Left = 6416
      MaskColor = &H00000000&
      MouseIcon = "Viewer.frx":0CE2
      Picture = "Viewer.frx":0E34
      Style = 1 'Graphical
      TabIndex = 9
      TabStop = 0 'False
      Top = 0
      UseMaskColor = -1 'True
      Width = 492
   End

You need to add the Subroutine invoked when clicking::

Private Sub cmdView_Click()
    Dim ret As Long
    On Error Resume Next
    If MailListIndex <> 0 Then
    'Message is selected, show
        f = UCase(lstMail.ListItems(MailListIndex).Key)
        ret = ShellExecute(frmMain.hwnd, "Open", ViewerCurBox & "\" & f, "", "", 1)
    End If
End Sub

To finish, you have to take care of resizing:
Go for the "Form_Resize" Subroutine and add the one line you need:

Private Sub Form_Resize()
    ......

    tabView.TabFixedWidth = fw * 0.1785714
    cmdTrash(0).Left = fw - 2152
    cmdTrash(1).Left = cmdTrash(0).Left + 540
    cmdView.Left = cmdTrash(0).Left - 540
    cmdNavigate(0).Left = cmdTrash(1).Left + 540
    cmdNavigate(1).Left = cmdNavigate(0).Left + 540

    .....
   
End Sub

Back to Root Index or Root Main Pages