home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 10 / 10.iso / l / l405 / 3.ddi / NEWMSG.FR_ / NEWMSG.bin (.txt)
Encoding:
Visual Basic Form  |  1993-04-28  |  11.4 KB  |  334 lines

  1. VERSION 2.00
  2. Begin Form NewMsg 
  3.    Caption         =   "Send Note"
  4.    ClientHeight    =   3135
  5.    ClientLeft      =   1875
  6.    ClientTop       =   2160
  7.    ClientWidth     =   7380
  8.    Height          =   3540
  9.    Left            =   1815
  10.    LinkTopic       =   "Form2"
  11.    MDIChild        =   -1  'True
  12.    ScaleHeight     =   3135
  13.    ScaleWidth      =   7380
  14.    Top             =   1815
  15.    Width           =   7500
  16.    Begin PictureBox Picture2 
  17.       Align           =   1  'Align Top
  18.       BackColor       =   &H00C0C0C0&
  19.       BorderStyle     =   0  'None
  20.       Height          =   495
  21.       Left            =   0
  22.       ScaleHeight     =   495
  23.       ScaleWidth      =   7380
  24.       TabIndex        =   8
  25.       Top             =   0
  26.       Width           =   7380
  27.       Begin CommandButton CompAdd 
  28.          Caption         =   "A&ddress"
  29.          FontBold        =   0   'False
  30.          FontItalic      =   0   'False
  31.          FontName        =   "MS Sans Serif"
  32.          FontSize        =   8.25
  33.          FontStrikethru  =   0   'False
  34.          FontUnderline   =   0   'False
  35.          Height          =   330
  36.          Left            =   5940
  37.          TabIndex        =   13
  38.          Top             =   90
  39.          Width           =   1335
  40.       End
  41.       Begin CommandButton CompOpt 
  42.          Caption         =   "Op&tions"
  43.          FontBold        =   0   'False
  44.          FontItalic      =   0   'False
  45.          FontName        =   "MS Sans Serif"
  46.          FontSize        =   8.25
  47.          FontStrikethru  =   0   'False
  48.          FontUnderline   =   0   'False
  49.          Height          =   330
  50.          Left            =   4500
  51.          TabIndex        =   12
  52.          Top             =   90
  53.          Width           =   1335
  54.       End
  55.       Begin CommandButton Attach 
  56.          Caption         =   "&Attach"
  57.          FontBold        =   0   'False
  58.          FontItalic      =   0   'False
  59.          FontName        =   "MS Sans Serif"
  60.          FontSize        =   8.25
  61.          FontStrikethru  =   0   'False
  62.          FontUnderline   =   0   'False
  63.          Height          =   330
  64.          Left            =   3060
  65.          TabIndex        =   11
  66.          Top             =   90
  67.          Width           =   1335
  68.       End
  69.       Begin CommandButton ChkNames 
  70.          Caption         =   "Chec&k Names"
  71.          FontBold        =   0   'False
  72.          FontItalic      =   0   'False
  73.          FontName        =   "MS Sans Serif"
  74.          FontSize        =   8.25
  75.          FontStrikethru  =   0   'False
  76.          FontUnderline   =   0   'False
  77.          Height          =   330
  78.          Left            =   1620
  79.          TabIndex        =   10
  80.          Top             =   90
  81.          Width           =   1335
  82.       End
  83.       Begin CommandButton Send 
  84.          Caption         =   "&Send"
  85.          FontBold        =   0   'False
  86.          FontItalic      =   0   'False
  87.          FontName        =   "MS Sans Serif"
  88.          FontSize        =   8.25
  89.          FontStrikethru  =   0   'False
  90.          FontUnderline   =   0   'False
  91.          Height          =   330
  92.          Left            =   180
  93.          TabIndex        =   9
  94.          Top             =   90
  95.          Width           =   1335
  96.       End
  97.       Begin Line Line2 
  98.          BorderColor     =   &H00FFFFFF&
  99.          X1              =   0
  100.          X2              =   0
  101.          Y1              =   0
  102.          Y2              =   540
  103.       End
  104.       Begin Line TopLine2 
  105.          BorderColor     =   &H00FFFFFF&
  106.          X1              =   0
  107.          X2              =   7380
  108.          Y1              =   0
  109.          Y2              =   0
  110.       End
  111.    End
  112.    Begin TextBox txtNoteText 
  113.       FontBold        =   0   'False
  114.       FontItalic      =   0   'False
  115.       FontName        =   "MS Sans Serif"
  116.       FontSize        =   8.25
  117.       FontStrikethru  =   0   'False
  118.       FontUnderline   =   0   'False
  119.       Height          =   1275
  120.       Left            =   0
  121.       MultiLine       =   -1  'True
  122.       ScrollBars      =   2  'Vertical
  123.       TabIndex        =   3
  124.       Top             =   1890
  125.       Width           =   7395
  126.    End
  127.    Begin PictureBox Picture1 
  128.       Align           =   1  'Align Top
  129.       BackColor       =   &H00C0C0C0&
  130.       BorderStyle     =   0  'None
  131.       FillStyle       =   0  'Solid
  132.       Height          =   1395
  133.       Left            =   0
  134.       ScaleHeight     =   1395
  135.       ScaleWidth      =   7380
  136.       TabIndex        =   4
  137.       Top             =   495
  138.       Width           =   7380
  139.       Begin TextBox txtTo 
  140.          BackColor       =   &H00FFFFFF&
  141.          FontBold        =   0   'False
  142.          FontItalic      =   0   'False
  143.          FontName        =   "MS Sans Serif"
  144.          FontSize        =   8.25
  145.          FontStrikethru  =   0   'False
  146.          FontUnderline   =   0   'False
  147.          Height          =   285
  148.          Left            =   900
  149.          TabIndex        =   0
  150.          Top             =   180
  151.          Width           =   4995
  152.       End
  153.       Begin TextBox txtcc 
  154.          BackColor       =   &H00FFFFFF&
  155.          FontBold        =   0   'False
  156.          FontItalic      =   0   'False
  157.          FontName        =   "MS Sans Serif"
  158.          FontSize        =   8.25
  159.          FontStrikethru  =   0   'False
  160.          FontUnderline   =   0   'False
  161.          Height          =   285
  162.          Left            =   900
  163.          TabIndex        =   1
  164.          Top             =   540
  165.          Width           =   4995
  166.       End
  167.       Begin TextBox txtsubject 
  168.          BackColor       =   &H00FFFFFF&
  169.          FontBold        =   0   'False
  170.          FontItalic      =   0   'False
  171.          FontName        =   "MS Sans Serif"
  172.          FontSize        =   8.25
  173.          FontStrikethru  =   0   'False
  174.          FontUnderline   =   0   'False
  175.          Height          =   285
  176.          Left            =   900
  177.          TabIndex        =   2
  178.          Top             =   900
  179.          Width           =   4995
  180.       End
  181.       Begin Line TopLine 
  182.          BorderColor     =   &H00FFFFFF&
  183.          Index           =   1
  184.          X1              =   0
  185.          X2              =   7320
  186.          Y1              =   15
  187.          Y2              =   15
  188.       End
  189.       Begin Line LeftLine 
  190.          BorderColor     =   &H00FFFFFF&
  191.          X1              =   0
  192.          X2              =   0
  193.          Y1              =   0
  194.          Y2              =   1380
  195.       End
  196.       Begin Line TopLine 
  197.          BorderColor     =   &H00000000&
  198.          Index           =   0
  199.          X1              =   0
  200.          X2              =   7320
  201.          Y1              =   0
  202.          Y2              =   0
  203.       End
  204.       Begin Label Label3 
  205.          AutoSize        =   -1  'True
  206.          BackStyle       =   0  'Transparent
  207.          Caption         =   "&To:"
  208.          Height          =   195
  209.          Left            =   120
  210.          TabIndex        =   5
  211.          Top             =   240
  212.          Width           =   300
  213.       End
  214.       Begin Label Label4 
  215.          AutoSize        =   -1  'True
  216.          BackStyle       =   0  'Transparent
  217.          Caption         =   "&Cc:"
  218.          Height          =   195
  219.          Left            =   120
  220.          TabIndex        =   6
  221.          Top             =   600
  222.          Width           =   300
  223.       End
  224.       Begin Label Label5 
  225.          AutoSize        =   -1  'True
  226.          BackStyle       =   0  'Transparent
  227.          Caption         =   "Subj&ect:"
  228.          Height          =   195
  229.          Left            =   120
  230.          TabIndex        =   7
  231.          Top             =   960
  232.          Width           =   720
  233.       End
  234.    End
  235. Sub Attach_Click ()
  236. '-----------------------------------------------------------------
  237. '  Feature Addition: Code needs to be added to handle attachments
  238. '-----------------------------------------------------------------
  239. On Error Resume Next
  240.    VBMail.CMDialog1.DialogTitle = "Attach"
  241.    VBMail.CMDialog1.Filter = "All Files(*.*)|*.*|Text Files(*.txt)|*.txt"
  242.    VBMail.CMDialog1.Action = 1
  243.    If Err = 0 Then
  244.         On Error GoTo 0
  245.         VBMail.MapiMess.AttachmentIndex = VBMail.MapiMess.AttachmentCount
  246.         VBMail.MapiMess.AttachmentName = VBMail.CMDialog1.Filetitle
  247.         VBMail.MapiMess.AttachmentPathName = VBMail.CMDialog1.Filename
  248.         VBMail.MapiMess.AttachmentPosition = VBMail.MapiMess.AttachmentIndex
  249.         VBMail.MapiMess.AttachmentType = MAPI_ATT_File
  250.    End If
  251. End Sub
  252. Sub ChkNames_Click ()
  253. '-----------------------------------------------------------------
  254. '  Feature Addition: Code needs to be added to resolve the names
  255. '-----------------------------------------------------------------
  256.     Call CopyNamestoMsgBuffer(Me, True)
  257.     Call UpdateRecips(Me)
  258. End Sub
  259. Sub CompAdd_Click ()
  260. '-----------------------------------------------------------------
  261. '  Display Address book w/ currect recipts and update upon return
  262. '-----------------------------------------------------------------
  263.     Call CopyNamestoMsgBuffer(Me, False)
  264.     VBMail.MapiMess.Action = MESSAGE_SHOWADBOOK
  265.     Call UpdateRecips(Me)
  266. End Sub
  267. Sub CompOpt_Click ()
  268. '-----------------------------------------------------------------------
  269. '  Display Message option form
  270. '-----------------------------------------------------------------------
  271.     OptionType = OPTION_MESSAGE
  272.     MailOptFrm.Show 1
  273. End Sub
  274. Sub Form_Activate ()
  275. '--- Set the MessageIndex = -1 (Compose Buffer) when this window is activated
  276.     VBMail.MapiMess.MsgIndex = -1
  277. End Sub
  278. Sub Form_Load ()
  279. '----- Ensure the windows are sized as needed
  280.     Call Picture1_Resize
  281.     Call Picture2_Resize
  282.     Call Form_Resize
  283. End Sub
  284. Sub Form_Resize ()
  285. '---- Adjust the window sizes if the form isn't minimized
  286.     If WindowSTate <> 1 Then
  287.         If scaleheight > txtNoteText.Top Then
  288.             txtNoteText.Height = scaleheight - txtNoteText.Top
  289.             txtNoteText.Width = ScaleWidth
  290.         End If
  291.     End If
  292. End Sub
  293. Sub Picture1_Resize ()
  294. '---------------------------------------------------
  295. '  Update the widths of the fields and adjust the line
  296. '  controls as needed.
  297. '---------------------------------------------------
  298.     TopLine(0).X2 = picture1.Width
  299.     TopLine(1).X2 = picture1.Width
  300.     picture1.Refresh
  301. End Sub
  302. Sub Picture2_Resize ()
  303. '---------------------------------------------------
  304. '  Update the widths of the fields and adjust the line
  305. '  controls as needed.
  306. '---------------------------------------------------
  307.     TopLine2.X2 = Picture2.Width
  308.     Picture2.Refresh
  309. End Sub
  310. Sub Send_Click ()
  311. '---------------------------------------------------------
  312. '   Place the Subject and Note text into the buffer
  313. '   Add room in the begining for attachment files
  314. '---------------------------------------------------------
  315.     If VBMail.MapiMess.AttachmentCount > 0 Then
  316.         txtNoteText = String$(VBMail.MapiMess.AttachmentCount, "*") + txtNoteText
  317.     End If
  318.     VBMail.MapiMess.MsgSubject = txtSubject
  319.     VBMail.MapiMess.MsgNoteText = txtNoteText
  320.     VBMail.MapiMess.MsgReceiptRequested = ReturnRequest
  321. '---------------------------------------------------------
  322. '   Resolve anems Load Recips into the buffer
  323. '---------------------------------------------------------
  324.     Call CopyNamestoMsgBuffer(Me, True)
  325.                   
  326.     On Error Resume Next
  327.     VBMail.MapiMess.Action = MESSAGE_SEND
  328.     If Err Then
  329.         MsgBox "An error occured during a send: " + Str$(Err)
  330.     Else
  331.         Unload Me
  332.     End If
  333. End Sub
  334.