home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form NewMsg
- Caption = "Send Note"
- ClientHeight = 3135
- ClientLeft = 1875
- ClientTop = 2160
- ClientWidth = 7380
- Height = 3540
- Left = 1815
- LinkTopic = "Form2"
- MDIChild = -1 'True
- ScaleHeight = 3135
- ScaleWidth = 7380
- Top = 1815
- Width = 7500
- Begin PictureBox Picture2
- Align = 1 'Align Top
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'None
- Height = 495
- Left = 0
- ScaleHeight = 495
- ScaleWidth = 7380
- TabIndex = 8
- Top = 0
- Width = 7380
- Begin CommandButton CompAdd
- Caption = "A&ddress"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 5940
- TabIndex = 13
- Top = 90
- Width = 1335
- End
- Begin CommandButton CompOpt
- Caption = "Op&tions"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 4500
- TabIndex = 12
- Top = 90
- Width = 1335
- End
- Begin CommandButton Attach
- Caption = "&Attach"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 3060
- TabIndex = 11
- Top = 90
- Width = 1335
- End
- Begin CommandButton ChkNames
- Caption = "Chec&k Names"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 1620
- TabIndex = 10
- Top = 90
- Width = 1335
- End
- Begin CommandButton Send
- Caption = "&Send"
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 330
- Left = 180
- TabIndex = 9
- Top = 90
- Width = 1335
- End
- Begin Line Line2
- BorderColor = &H00FFFFFF&
- X1 = 0
- X2 = 0
- Y1 = 0
- Y2 = 540
- End
- Begin Line TopLine2
- BorderColor = &H00FFFFFF&
- X1 = 0
- X2 = 7380
- Y1 = 0
- Y2 = 0
- End
- End
- Begin TextBox txtNoteText
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 1275
- Left = 0
- MultiLine = -1 'True
- ScrollBars = 2 'Vertical
- TabIndex = 3
- Top = 1890
- Width = 7395
- End
- Begin PictureBox Picture1
- Align = 1 'Align Top
- BackColor = &H00C0C0C0&
- BorderStyle = 0 'None
- FillStyle = 0 'Solid
- Height = 1395
- Left = 0
- ScaleHeight = 1395
- ScaleWidth = 7380
- TabIndex = 4
- Top = 495
- Width = 7380
- Begin TextBox txtTo
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 285
- Left = 900
- TabIndex = 0
- Top = 180
- Width = 4995
- End
- Begin TextBox txtcc
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 285
- Left = 900
- TabIndex = 1
- Top = 540
- Width = 4995
- End
- Begin TextBox txtsubject
- BackColor = &H00FFFFFF&
- FontBold = 0 'False
- FontItalic = 0 'False
- FontName = "MS Sans Serif"
- FontSize = 8.25
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 285
- Left = 900
- TabIndex = 2
- Top = 900
- Width = 4995
- End
- Begin Line TopLine
- BorderColor = &H00FFFFFF&
- Index = 1
- X1 = 0
- X2 = 7320
- Y1 = 15
- Y2 = 15
- End
- Begin Line LeftLine
- BorderColor = &H00FFFFFF&
- X1 = 0
- X2 = 0
- Y1 = 0
- Y2 = 1380
- End
- Begin Line TopLine
- BorderColor = &H00000000&
- Index = 0
- X1 = 0
- X2 = 7320
- Y1 = 0
- Y2 = 0
- End
- Begin Label Label3
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "&To:"
- Height = 195
- Left = 120
- TabIndex = 5
- Top = 240
- Width = 300
- End
- Begin Label Label4
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "&Cc:"
- Height = 195
- Left = 120
- TabIndex = 6
- Top = 600
- Width = 300
- End
- Begin Label Label5
- AutoSize = -1 'True
- BackStyle = 0 'Transparent
- Caption = "Subj&ect:"
- Height = 195
- Left = 120
- TabIndex = 7
- Top = 960
- Width = 720
- End
- End
- Sub Attach_Click ()
- '-----------------------------------------------------------------
- ' Feature Addition: Code needs to be added to handle attachments
- '-----------------------------------------------------------------
- On Error Resume Next
- VBMail.CMDialog1.DialogTitle = "Attach"
- VBMail.CMDialog1.Filter = "All Files(*.*)|*.*|Text Files(*.txt)|*.txt"
- VBMail.CMDialog1.Action = 1
- If Err = 0 Then
- On Error GoTo 0
- VBMail.MapiMess.AttachmentIndex = VBMail.MapiMess.AttachmentCount
- VBMail.MapiMess.AttachmentName = VBMail.CMDialog1.Filetitle
- VBMail.MapiMess.AttachmentPathName = VBMail.CMDialog1.Filename
- VBMail.MapiMess.AttachmentPosition = VBMail.MapiMess.AttachmentIndex
- VBMail.MapiMess.AttachmentType = MAPI_ATT_File
- End If
- End Sub
- Sub ChkNames_Click ()
- '-----------------------------------------------------------------
- ' Feature Addition: Code needs to be added to resolve the names
- '-----------------------------------------------------------------
- Call CopyNamestoMsgBuffer(Me, True)
- Call UpdateRecips(Me)
- End Sub
- Sub CompAdd_Click ()
- '-----------------------------------------------------------------
- ' Display Address book w/ currect recipts and update upon return
- '-----------------------------------------------------------------
- Call CopyNamestoMsgBuffer(Me, False)
- VBMail.MapiMess.Action = MESSAGE_SHOWADBOOK
- Call UpdateRecips(Me)
- End Sub
- Sub CompOpt_Click ()
- '-----------------------------------------------------------------------
- ' Display Message option form
- '-----------------------------------------------------------------------
- OptionType = OPTION_MESSAGE
- MailOptFrm.Show 1
- End Sub
- Sub Form_Activate ()
- '--- Set the MessageIndex = -1 (Compose Buffer) when this window is activated
- VBMail.MapiMess.MsgIndex = -1
- End Sub
- Sub Form_Load ()
- '----- Ensure the windows are sized as needed
- Call Picture1_Resize
- Call Picture2_Resize
- Call Form_Resize
- End Sub
- Sub Form_Resize ()
- '---- Adjust the window sizes if the form isn't minimized
- If WindowSTate <> 1 Then
- If scaleheight > txtNoteText.Top Then
- txtNoteText.Height = scaleheight - txtNoteText.Top
- txtNoteText.Width = ScaleWidth
- End If
- End If
- End Sub
- Sub Picture1_Resize ()
- '---------------------------------------------------
- ' Update the widths of the fields and adjust the line
- ' controls as needed.
- '---------------------------------------------------
- TopLine(0).X2 = picture1.Width
- TopLine(1).X2 = picture1.Width
- picture1.Refresh
- End Sub
- Sub Picture2_Resize ()
- '---------------------------------------------------
- ' Update the widths of the fields and adjust the line
- ' controls as needed.
- '---------------------------------------------------
- TopLine2.X2 = Picture2.Width
- Picture2.Refresh
- End Sub
- Sub Send_Click ()
- '---------------------------------------------------------
- ' Place the Subject and Note text into the buffer
- ' Add room in the begining for attachment files
- '---------------------------------------------------------
- If VBMail.MapiMess.AttachmentCount > 0 Then
- txtNoteText = String$(VBMail.MapiMess.AttachmentCount, "*") + txtNoteText
- End If
- VBMail.MapiMess.MsgSubject = txtSubject
- VBMail.MapiMess.MsgNoteText = txtNoteText
- VBMail.MapiMess.MsgReceiptRequested = ReturnRequest
- '---------------------------------------------------------
- ' Resolve anems Load Recips into the buffer
- '---------------------------------------------------------
- Call CopyNamestoMsgBuffer(Me, True)
-
- On Error Resume Next
- VBMail.MapiMess.Action = MESSAGE_SEND
- If Err Then
- MsgBox "An error occured during a send: " + Str$(Err)
- Else
- Unload Me
- End If
- End Sub
-