home *** CD-ROM | disk | FTP | other *** search
/ Master 95 #1 / MASTER95_1.iso / microsof / vbasic4 / vb4-6.cab / msgview.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-07-26  |  8.8 KB  |  278 lines

  1. VERSION 4.00
  2. Begin VB.Form MsgView 
  3.    Caption         =   "Mail Message"
  4.    ClientHeight    =   4380
  5.    ClientLeft      =   3150
  6.    ClientTop       =   4800
  7.    ClientWidth     =   6210
  8.    Height          =   4740
  9.    Icon            =   "MSGVIEW.frx":0000
  10.    Left            =   3090
  11.    MDIChild        =   -1  'True
  12.    ScaleHeight     =   4380
  13.    ScaleWidth      =   6210
  14.    Top             =   4500
  15.    Width           =   6330
  16.    Begin VB.PictureBox AttachWin 
  17.       Align           =   2  'Align Bottom
  18.       BackColor       =   &H00C0C0C0&
  19.       Height          =   825
  20.       Left            =   0
  21.       ScaleHeight     =   765
  22.       ScaleWidth      =   6150
  23.       TabIndex        =   12
  24.       Top             =   3555
  25.       Visible         =   0   'False
  26.       Width           =   6210
  27.       Begin VB.ListBox aList 
  28.          Height          =   255
  29.          Left            =   240
  30.          TabIndex        =   14
  31.          Top             =   300
  32.          Width           =   5835
  33.       End
  34.       Begin VB.Label NumAtt 
  35.          AutoSize        =   -1  'True
  36.          BackStyle       =   0  'Transparent
  37.          Height          =   195
  38.          Left            =   1200
  39.          TabIndex        =   15
  40.          Top             =   60
  41.          Width           =   45
  42.       End
  43.       Begin VB.Label Label6 
  44.          AutoSize        =   -1  'True
  45.          BackStyle       =   0  'Transparent
  46.          Caption         =   "Attachments:"
  47.          Height          =   195
  48.          Left            =   60
  49.          TabIndex        =   13
  50.          Top             =   60
  51.          Width           =   930
  52.       End
  53.    End
  54.    Begin VB.TextBox txtNoteText 
  55.       Height          =   1815
  56.       Left            =   0
  57.       MultiLine       =   -1  'True
  58.       ScrollBars      =   2  'Vertical
  59.       TabIndex        =   0
  60.       Top             =   1740
  61.       Width           =   6195
  62.    End
  63.    Begin VB.PictureBox Picture1 
  64.       Align           =   1  'Align Top
  65.       BackColor       =   &H00C0C0C0&
  66.       Height          =   1755
  67.       Left            =   0
  68.       ScaleHeight     =   1695
  69.       ScaleWidth      =   6150
  70.       TabIndex        =   6
  71.       Top             =   0
  72.       Width           =   6210
  73.       Begin VB.TextBox txtsubject 
  74.          BackColor       =   &H00C0C0C0&
  75.          BorderStyle     =   0  'None
  76.          Height          =   225
  77.          Left            =   900
  78.          TabIndex        =   5
  79.          Top             =   1320
  80.          Width           =   4995
  81.       End
  82.       Begin VB.TextBox txtcc 
  83.          BackColor       =   &H00C0C0C0&
  84.          BorderStyle     =   0  'None
  85.          Height          =   225
  86.          Left            =   900
  87.          TabIndex        =   4
  88.          Top             =   1020
  89.          Width           =   4995
  90.       End
  91.       Begin VB.TextBox txtTo 
  92.          BackColor       =   &H00C0C0C0&
  93.          BorderStyle     =   0  'None
  94.          Height          =   225
  95.          Left            =   900
  96.          TabIndex        =   3
  97.          Top             =   720
  98.          Width           =   4995
  99.       End
  100.       Begin VB.TextBox txtDate 
  101.          BackColor       =   &H00C0C0C0&
  102.          BorderStyle     =   0  'None
  103.          Height          =   225
  104.          Left            =   900
  105.          TabIndex        =   2
  106.          Top             =   420
  107.          Width           =   4995
  108.       End
  109.       Begin VB.TextBox txtFrom 
  110.          BackColor       =   &H00C0C0C0&
  111.          BorderStyle     =   0  'None
  112.          Height          =   225
  113.          Left            =   900
  114.          TabIndex        =   1
  115.          Top             =   120
  116.          Width           =   4995
  117.       End
  118.       Begin VB.Label Label5 
  119.          AutoSize        =   -1  'True
  120.          BackStyle       =   0  'Transparent
  121.          Caption         =   "Subject:"
  122.          Height          =   195
  123.          Left            =   120
  124.          TabIndex        =   11
  125.          Top             =   1320
  126.          Width           =   720
  127.       End
  128.       Begin VB.Label Label4 
  129.          AutoSize        =   -1  'True
  130.          BackStyle       =   0  'Transparent
  131.          Caption         =   "Cc:"
  132.          Height          =   195
  133.          Left            =   120
  134.          TabIndex        =   10
  135.          Top             =   1020
  136.          Width           =   300
  137.       End
  138.       Begin VB.Label Label3 
  139.          AutoSize        =   -1  'True
  140.          BackStyle       =   0  'Transparent
  141.          Caption         =   "To:"
  142.          Height          =   195
  143.          Left            =   120
  144.          TabIndex        =   9
  145.          Top             =   720
  146.          Width           =   300
  147.       End
  148.       Begin VB.Label Label2 
  149.          AutoSize        =   -1  'True
  150.          BackStyle       =   0  'Transparent
  151.          Caption         =   "Date:"
  152.          Height          =   195
  153.          Left            =   120
  154.          TabIndex        =   8
  155.          Top             =   420
  156.          Width           =   480
  157.       End
  158.       Begin VB.Label Label1 
  159.          AutoSize        =   -1  'True
  160.          BackStyle       =   0  'Transparent
  161.          Caption         =   "From:"
  162.          Height          =   195
  163.          Left            =   120
  164.          TabIndex        =   7
  165.          Top             =   120
  166.          Width           =   480
  167.       End
  168.       Begin VB.Line RightLine 
  169.          BorderColor     =   &H00FFFFFF&
  170.          X1              =   6000
  171.          X2              =   6000
  172.          Y1              =   60
  173.          Y2              =   1620
  174.       End
  175.       Begin VB.Line BottomLine 
  176.          BorderColor     =   &H00FFFFFF&
  177.          X1              =   60
  178.          X2              =   6000
  179.          Y1              =   1620
  180.          Y2              =   1620
  181.       End
  182.       Begin VB.Line TopLine 
  183.          BorderColor     =   &H00808080&
  184.          X1              =   60
  185.          X2              =   5940
  186.          Y1              =   60
  187.          Y2              =   60
  188.       End
  189.       Begin VB.Line LeftLine 
  190.          BorderColor     =   &H00808080&
  191.          X1              =   60
  192.          X2              =   60
  193.          Y1              =   60
  194.          Y2              =   1620
  195.       End
  196.    End
  197. Attribute VB_Name = "MsgView"
  198. Attribute VB_Creatable = False
  199. Attribute VB_Exposed = False
  200. Private Sub aList_DblClick()
  201.     ' ListIndex is the index into the attachment list.
  202.     VBMail.MapiMess.AttachmentIndex = aList.ListIndex
  203.     If VBMail.MapiMess.AttachmentType = vbAttachTypeData Then
  204.         Call DisplayAttachedFile(VBMail.MapiMess.AttachmentPathName)
  205.     Else
  206.         MsgBox " This sample application doesn't view OLE-type attachments"
  207.     End If
  208. End Sub
  209. Private Sub AttachWin_Resize()
  210.     '  Update the widths of the fields and adjust the line
  211.     '  controls as needed.
  212.     aList.Width = AttachWin.Width - aList.Left - 315
  213. End Sub
  214. Private Sub Form_Activate()
  215.     ' When the form is activated, update mailLst.MList
  216.     ' to reflect the current item. The Tag property contains
  217.     ' the index of the currently viewed message.
  218.     MailLst.MList.ListIndex = Val(Me.Tag)
  219.     MailLst.MList.ItemData(Val(Me.Tag)) = True
  220.     VBMail.MapiMess.MsgIndex = Val(Me.Tag)
  221. End Sub
  222. Private Sub Form_Load()
  223.     ' Ensure all resizing is done on startup.
  224.     Call Picture1_Resize
  225.     Call AttachWin_Resize
  226.     Call Form_Resize
  227. End Sub
  228. Private Sub Form_Resize()
  229.     ' Adjust the window size if the form isn't minimized.
  230.     Call SizeMessageWindow(Me)
  231. End Sub
  232. Private Sub Form_Unload(Cancel As Integer)
  233.     ' Tag is set to -1 after the currently viewed message
  234.     ' is deleted.
  235.     If Val(Me.Tag) > 0 Then
  236.         MailLst.MList.ItemData(Val(Me.Tag)) = False
  237.     End If
  238. End Sub
  239. Private Sub Picture1_Resize()
  240.     '  Update the widths of the fields and adjust the line
  241.     '  controls as needed.
  242.     TopLine.X2 = picture1.Width - 90
  243.     BottomLine.X2 = picture1.Width - 90
  244.     RightLine.X1 = picture1.Width - 90
  245.     RightLine.X2 = picture1.Width - 90
  246.     lf% = TxtTo.Left
  247.     TxtTo.Width = picture1.Width - 120 - lf%
  248.     txtDate.Width = picture1.Width - 120 - lf%
  249.     txtCC.Width = picture1.Width - 120 - lf%
  250.     txtSubject.Width = picture1.Width - 120 - lf%
  251.     txtFrom.Width = picture1.Width - 120 - lf%
  252.     picture1.Refresh
  253. End Sub
  254. Private Sub txtcc_KeyPress(KeyAscii As Integer)
  255.     ' Ignore all keystrokes.
  256.     KeyAscii = 0
  257. End Sub
  258. Private Sub txtDate_KeyPress(KeyAscii As Integer)
  259.     ' Ignore all keystrokes.
  260.     KeyAscii = 0
  261. End Sub
  262. Private Sub txtFrom_KeyPress(KeyAscii As Integer)
  263.     ' Ignore all keystrokes.
  264.     KeyAscii = 0
  265. End Sub
  266. Private Sub txtNoteText_KeyPress(KeyAscii As Integer)
  267.     ' Ignore all keystrokes.
  268.     KeyAscii = 0
  269. End Sub
  270. Private Sub txtsubject_KeyPress(KeyAscii As Integer)
  271.     ' Ignore all keystrokes.
  272.     KeyAscii = 0
  273. End Sub
  274. Private Sub txtTo_KeyPress(KeyAscii As Integer)
  275.     ' Ignore all keystrokes.
  276.     KeyAscii = 0
  277. End Sub
  278.