home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form MailLst
- BackColor = &H00C0C0C0&
- Caption = "Mail List"
- ClientHeight = 3540
- ClientLeft = 2055
- ClientTop = 3270
- ClientWidth = 6645
- Height = 3945
- Icon = MAILLST.FRX:0000
- Left = 1995
- LinkTopic = "Form2"
- MDIChild = -1 'True
- ScaleHeight = 3540
- ScaleWidth = 6645
- Top = 2925
- Width = 6765
- Begin PictureBox Tools
- Align = 2 'Align Bottom
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'None
- Height = 615
- Left = 0
- ScaleHeight = 615
- ScaleWidth = 6645
- TabIndex = 2
- Top = 2925
- Width = 6645
- Begin Line Line1
- BorderColor = &H00FFFFFF&
- Index = 1
- X1 = 0
- X2 = 6660
- Y1 = 15
- Y2 = 15
- End
- Begin Line Line1
- BorderColor = &H00000000&
- Index = 0
- X1 = 0
- X2 = 6660
- Y1 = 0
- Y2 = 0
- End
- Begin Image PrtImage
- Height = 480
- Left = 1200
- Picture = MAILLST.FRX:0302
- Top = 60
- Width = 480
- End
- Begin Image Trash
- Height = 480
- Left = 300
- Picture = MAILLST.FRX:0604
- Top = 60
- Width = 480
- End
- End
- Begin ListBox MList
- DragIcon = MAILLST.FRX:0906
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Courier New"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 2505
- Left = 90
- MultiSelect = 2 'Extended
- TabIndex = 0
- Top = 360
- Width = 6495
- End
- Begin Label Headings
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Listbox Headings"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "Courier New"
- FontSize = 9
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 225
- Left = 180
- TabIndex = 1
- Top = 60
- Width = 1680
- End
- Begin Image NewMail
- Height = 480
- Left = 5880
- Picture = MAILLST.FRX:0C08
- Top = 2820
- Visible = 0 'False
- Width = 480
- End
- Begin Image nonew
- Height = 480
- Left = 5280
- Picture = MAILLST.FRX:0F0A
- Top = 2880
- Visible = 0 'False
- Width = 480
- End
- '--- Module variable to hold MouseDown position information
- Dim ListX, ListY
- Sub Form_Load ()
- '--- Resize the form
- Height = 3945
- Call Tools_Resize
- '--- Setup listbox headings
- a$ = Mid$(Format$("From", "!" + String$(25, "@")), 1, 25)
- b$ = Mid$(Format$("Subject", "!" + String$(35, "@")), 1, 35)
- c$ = "Date"
- Headings = a$ + b$ + c$
- End Sub
- Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
- '---- If the user is closing the app, let this form unload
- If UnloadMode = 4 Then
- 'Unloading is okay
- Else
- '---- If the user is still logined in, minimize the form rather than closing it
- If VBMail.MapiMess.SessionID <> 0 Then
- Me.WindowState = 1
- Cancel = True
- End If
- End If
- End Sub
- Sub Form_Resize ()
- '--- If we aren't minimized, resize the listbox to fit the form
- If WindowState <> 1 Then
- If VBMail.DispTools.Checked Then
- xHeight% = Tools.Height
- Else
- xHeight% = 0
- End If
- '---- Check for minimum form height allowed
- If Height < 2500 - xHeight% Then
- Height = 2500
- Exit Sub
- End If
- MList.Width = ScaleWidth - MList.Left - 90
- MList.Height = ScaleHeight - 90 - MList.Top - xHeight%
- End If
- End Sub
- Sub MList_Click ()
- '-----------------------------------------------------
- ' Set the message index on a click and enabled the
- ' Previous and Next buttons as needed
- '-----------------------------------------------------
- Select Case MList.ListIndex
- Case 0
- VBMail.Previous.Enabled = False
- Case MList.ListCount - 1
- VBMail.Next.Enabled = False
- Case Else
- VBMail.Previous.Enabled = True
- VBMail.Next.Enabled = True
- End Select
- VBMail.MapiMess.MsgIndex = MList.ListIndex
- End Sub
- Sub MList_DBLClick ()
- '--------------------------------------------------------
- ' Check to see if the message is currently viewed,
- ' if not load it into a new form
- '--------------------------------------------------------
- If Not MailLst.MList.ItemData(MailLst.MList.ListIndex) Then
- Dim Msg As New MsgView
- Call LoadMessage(MailLst.MList.ListIndex, Msg)
- MailLst.MList.ItemData(MailLst.MList.ListIndex) = True
- Else
- '--------------------------------------------------------
- ' Search through the active windows to
- ' find the window with the correct message to view
- '--------------------------------------------------------
- For i = 0 To Forms.Count - 1
- If TypeOf Forms(i) Is MsgView Then
- If Val(Forms(i).Tag) = MailLst.MList.ListIndex Then
- Forms(i).Show
- Exit Sub
- End If
- End If
- Next i
- End If
- End Sub
- Sub MList_KeyPress (KeyAscii As Integer)
- '--- If the user hits the enter key, process it as a DBLCLICK action
- If KeyAscii = 13 Then
- Call MList_DBLClick
- End If
- End Sub
- Sub MList_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
- '--- Save the X/Y positions to determine drag/drop start
- ListX = X
- ListY = Y
- End Sub
- Sub MList_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
- '------------------------------------------------------------------------------
- ' If the mouse button is down and the x/y position has changed, start dragging
- '------------------------------------------------------------------------------
- If Button = 1 And ((X <> ListX) Or (Y <> ListY)) Then
- MList.Drag 1
- End If
- End Sub
- Sub PrtImage_DragDrop (Source As Control, X As Single, Y As Single)
- '--- Same as File.PrintMessage on the VBMAIL File Menu
- Call PrintMail
- End Sub
- Sub Tools_Resize ()
- '---- Adjust the width of the lines on the top of the toolbar
- Line1(0).X2 = Tools.Width
- Line1(1).X2 = Tools.Width
- Tools.Refresh
- End Sub
- Sub Trash_DragDrop (Source As Control, X As Single, Y As Single)
- '--- Deletes a message (Delete Button or Edit.Delete)
- Call DeleteMessage
- End Sub
-