home *** CD-ROM | disk | FTP | other *** search
/ Programmer Plus 2007 / Programmer-Plus-2007.iso / Programming / Visual Basic new SourceCode and Projects / Vb E-mail Applictation / MSGVIEW.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2000-04-15  |  8.8 KB  |  277 lines

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