home *** CD-ROM | disk | FTP | other *** search
/ On Hand / On_Hand_From_Softbank_1994_Release_2_Disc_2_1994.iso / 00202 / s / disk3 / maillst.fr_ / maillst.bin
Text File  |  1993-04-28  |  8KB  |  238 lines

  1. VERSION 2.00
  2. Begin Form MailLst 
  3.    BackColor       =   &H00C0C0C0&
  4.    Caption         =   "Mail List"
  5.    ClientHeight    =   3540
  6.    ClientLeft      =   2055
  7.    ClientTop       =   3270
  8.    ClientWidth     =   6645
  9.    Height          =   3945
  10.    Icon            =   MAILLST.FRX:0000
  11.    Left            =   1995
  12.    LinkTopic       =   "Form2"
  13.    MDIChild        =   -1  'True
  14.    ScaleHeight     =   3540
  15.    ScaleWidth      =   6645
  16.    Top             =   2925
  17.    Width           =   6765
  18.    Begin PictureBox Tools 
  19.       Align           =   2  'Align Bottom
  20.       BackColor       =   &H00C0C0C0&
  21.       BorderStyle     =   0  'None
  22.       Height          =   615
  23.       Left            =   0
  24.       ScaleHeight     =   615
  25.       ScaleWidth      =   6645
  26.       TabIndex        =   2
  27.       Top             =   2925
  28.       Width           =   6645
  29.       Begin Line Line1 
  30.          BorderColor     =   &H00FFFFFF&
  31.          Index           =   1
  32.          X1              =   0
  33.          X2              =   6660
  34.          Y1              =   15
  35.          Y2              =   15
  36.       End
  37.       Begin Line Line1 
  38.          BorderColor     =   &H00000000&
  39.          Index           =   0
  40.          X1              =   0
  41.          X2              =   6660
  42.          Y1              =   0
  43.          Y2              =   0
  44.       End
  45.       Begin Image PrtImage 
  46.          Height          =   480
  47.          Left            =   1200
  48.          Picture         =   MAILLST.FRX:0302
  49.          Top             =   60
  50.          Width           =   480
  51.       End
  52.       Begin Image Trash 
  53.          Height          =   480
  54.          Left            =   300
  55.          Picture         =   MAILLST.FRX:0604
  56.          Top             =   60
  57.          Width           =   480
  58.       End
  59.    End
  60.    Begin ListBox MList 
  61.       DragIcon        =   MAILLST.FRX:0906
  62.       FontBold        =   0   'False
  63.       FontItalic      =   0   'False
  64.       FontName        =   "Courier New"
  65.       FontSize        =   9
  66.       FontStrikethru  =   0   'False
  67.       FontUnderline   =   0   'False
  68.       Height          =   2505
  69.       Left            =   90
  70.       MultiSelect     =   2  'Extended
  71.       TabIndex        =   0
  72.       Top             =   360
  73.       Width           =   6495
  74.    End
  75.    Begin Label Headings 
  76.       AutoSize        =   -1  'True
  77.       BackStyle       =   0  'Transparent
  78.       Caption         =   "Listbox Headings"
  79.       FontBold        =   0   'False
  80.       FontItalic      =   0   'False
  81.       FontName        =   "Courier New"
  82.       FontSize        =   9
  83.       FontStrikethru  =   0   'False
  84.       FontUnderline   =   0   'False
  85.       Height          =   225
  86.       Left            =   180
  87.       TabIndex        =   1
  88.       Top             =   60
  89.       Width           =   1680
  90.    End
  91.    Begin Image NewMail 
  92.       Height          =   480
  93.       Left            =   5880
  94.       Picture         =   MAILLST.FRX:0C08
  95.       Top             =   2820
  96.       Visible         =   0   'False
  97.       Width           =   480
  98.    End
  99.    Begin Image nonew 
  100.       Height          =   480
  101.       Left            =   5280
  102.       Picture         =   MAILLST.FRX:0F0A
  103.       Top             =   2880
  104.       Visible         =   0   'False
  105.       Width           =   480
  106.    End
  107. End
  108. '--- Module variable to hold MouseDown position information
  109. Dim ListX, ListY
  110.  
  111. Sub Form_Load ()
  112. '--- Resize the form
  113.     Height = 3945
  114.     Call Tools_Resize
  115.  
  116. '--- Setup listbox headings
  117.      a$ = Mid$(Format$("From", "!" + String$(25, "@")), 1, 25)
  118.      b$ = Mid$(Format$("Subject", "!" + String$(35, "@")), 1, 35)
  119.      c$ = "Date"
  120.      Headings = a$ + b$ + c$
  121. End Sub
  122.  
  123. Sub Form_QueryUnload (Cancel As Integer, UnloadMode As Integer)
  124. '---- If the user is closing the app, let this form unload
  125.     If UnloadMode = 4 Then
  126.         'Unloading is okay
  127.     Else
  128. '---- If the user is still logined in, minimize the form rather than closing it
  129.         If VBMail.MapiMess.SessionID <> 0 Then
  130.             Me.WindowState = 1
  131.             Cancel = True
  132.         End If
  133.     End If
  134. End Sub
  135.  
  136. Sub Form_Resize ()
  137. '--- If we aren't minimized, resize the listbox to fit the form
  138.     If WindowState <> 1 Then
  139.  
  140.         If VBMail.DispTools.Checked Then
  141.             xHeight% = Tools.Height
  142.         Else
  143.             xHeight% = 0
  144.         End If
  145.  
  146.         '---- Check for minimum form height allowed
  147.         If Height < 2500 - xHeight% Then
  148.             Height = 2500
  149.             Exit Sub
  150.         End If
  151.  
  152.         MList.Width = ScaleWidth - MList.Left - 90
  153.         MList.Height = ScaleHeight - 90 - MList.Top - xHeight%
  154.     End If
  155. End Sub
  156.  
  157. Sub MList_Click ()
  158. '-----------------------------------------------------
  159. ' Set the message index on a click and enabled the
  160. ' Previous and Next buttons as needed
  161. '-----------------------------------------------------
  162.     Select Case MList.ListIndex
  163.         Case 0
  164.             VBMail.Previous.Enabled = False
  165.         Case MList.ListCount - 1
  166.             VBMail.Next.Enabled = False
  167.         Case Else
  168.             VBMail.Previous.Enabled = True
  169.             VBMail.Next.Enabled = True
  170.     End Select
  171.     VBMail.MapiMess.MsgIndex = MList.ListIndex
  172. End Sub
  173.  
  174. Sub MList_DBLClick ()
  175. '--------------------------------------------------------
  176. '  Check to see if the message is currently viewed,
  177. '  if not load it into a new form
  178. '--------------------------------------------------------
  179.     If Not MailLst.MList.ItemData(MailLst.MList.ListIndex) Then
  180.        Dim Msg As New MsgView
  181.        Call LoadMessage(MailLst.MList.ListIndex, Msg)
  182.        MailLst.MList.ItemData(MailLst.MList.ListIndex) = True
  183.     Else
  184.     '--------------------------------------------------------
  185.     '  Search through the active windows to
  186.     '  find the window with the correct message to view
  187.     '--------------------------------------------------------
  188.         For i = 0 To Forms.Count - 1
  189.             If TypeOf Forms(i) Is MsgView Then
  190.                 If Val(Forms(i).Tag) = MailLst.MList.ListIndex Then
  191.                     Forms(i).Show
  192.                     Exit Sub
  193.                 End If
  194.             End If
  195.         Next i
  196.      End If
  197. End Sub
  198.  
  199. Sub MList_KeyPress (KeyAscii As Integer)
  200. '--- If the user hits the enter key, process it as a DBLCLICK action
  201.     If KeyAscii = 13 Then
  202.         Call MList_DBLClick
  203.     End If
  204. End Sub
  205.  
  206. Sub MList_MouseDown (Button As Integer, Shift As Integer, X As Single, Y As Single)
  207. '--- Save the X/Y positions to determine drag/drop start
  208.     ListX = X
  209.     ListY = Y
  210. End Sub
  211.  
  212. Sub MList_MouseMove (Button As Integer, Shift As Integer, X As Single, Y As Single)
  213. '------------------------------------------------------------------------------
  214. '  If the mouse button is down and the x/y position has changed, start dragging
  215. '------------------------------------------------------------------------------
  216.     If Button = 1 And ((X <> ListX) Or (Y <> ListY)) Then
  217.         MList.Drag 1
  218.     End If
  219. End Sub
  220.  
  221. Sub PrtImage_DragDrop (Source As Control, X As Single, Y As Single)
  222. '--- Same as File.PrintMessage on the VBMAIL File Menu
  223.     Call PrintMail
  224. End Sub
  225.  
  226. Sub Tools_Resize ()
  227. '---- Adjust the width of the lines on the top of the toolbar
  228.     Line1(0).X2 = Tools.Width
  229.     Line1(1).X2 = Tools.Width
  230.     Tools.Refresh
  231. End Sub
  232.  
  233. Sub Trash_DragDrop (Source As Control, X As Single, Y As Single)
  234. '--- Deletes a message (Delete Button or Edit.Delete)
  235.    Call DeleteMessage
  236. End Sub
  237.  
  238.