home *** CD-ROM | disk | FTP | other *** search
/ On Hand / On_Hand_From_Softbank_1994_Release_2_Disc_2_1994.iso / 00202 / s / disk3 / newmsg.fr_ / newmsg.bin
Text File  |  1993-04-28  |  12KB  |  345 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. End
  236. Sub Attach_Click ()
  237. '-----------------------------------------------------------------
  238. '  Feature Addition: Code needs to be added to handle attachments
  239. '-----------------------------------------------------------------
  240. On Error Resume Next
  241.    VBMail.CMDialog1.DialogTitle = "Attach"
  242.    VBMail.CMDialog1.Filter = "All Files(*.*)|*.*|Text Files(*.txt)|*.txt"
  243.    VBMail.CMDialog1.Action = 1
  244.    If Err = 0 Then
  245.         On Error GoTo 0
  246.         VBMail.MapiMess.AttachmentIndex = VBMail.MapiMess.AttachmentCount
  247.         VBMail.MapiMess.AttachmentName = VBMail.CMDialog1.Filetitle
  248.         VBMail.MapiMess.AttachmentPathName = VBMail.CMDialog1.Filename
  249.         VBMail.MapiMess.AttachmentPosition = VBMail.MapiMess.AttachmentIndex
  250.         VBMail.MapiMess.AttachmentType = MAPI_ATT_File
  251.    End If
  252. End Sub
  253.  
  254. Sub ChkNames_Click ()
  255. '-----------------------------------------------------------------
  256. '  Feature Addition: Code needs to be added to resolve the names
  257. '-----------------------------------------------------------------
  258.     Call CopyNamestoMsgBuffer(Me, True)
  259.     Call UpdateRecips(Me)
  260. End Sub
  261.  
  262. Sub CompAdd_Click ()
  263. '-----------------------------------------------------------------
  264. '  Display Address book w/ currect recipts and update upon return
  265. '-----------------------------------------------------------------
  266.     Call CopyNamestoMsgBuffer(Me, False)
  267.     VBMail.MapiMess.Action = MESSAGE_SHOWADBOOK
  268.     Call UpdateRecips(Me)
  269. End Sub
  270.  
  271. Sub CompOpt_Click ()
  272. '-----------------------------------------------------------------------
  273. '  Display Message option form
  274. '-----------------------------------------------------------------------
  275.     OptionType = OPTION_MESSAGE
  276.     MailOptFrm.Show 1
  277. End Sub
  278.  
  279. Sub Form_Activate ()
  280. '--- Set the MessageIndex = -1 (Compose Buffer) when this window is activated
  281.     VBMail.MapiMess.MsgIndex = -1
  282. End Sub
  283.  
  284. Sub Form_Load ()
  285. '----- Ensure the windows are sized as needed
  286.     Call Picture1_Resize
  287.     Call Picture2_Resize
  288.     Call Form_Resize
  289. End Sub
  290.  
  291. Sub Form_Resize ()
  292. '---- Adjust the window sizes if the form isn't minimized
  293.     If WindowSTate <> 1 Then
  294.         If scaleheight > txtNoteText.Top Then
  295.             txtNoteText.Height = scaleheight - txtNoteText.Top
  296.             txtNoteText.Width = ScaleWidth
  297.         End If
  298.     End If
  299. End Sub
  300.  
  301. Sub Picture1_Resize ()
  302. '---------------------------------------------------
  303. '  Update the widths of the fields and adjust the line
  304. '  controls as needed.
  305. '---------------------------------------------------
  306.     TopLine(0).X2 = picture1.Width
  307.     TopLine(1).X2 = picture1.Width
  308.     picture1.Refresh
  309. End Sub
  310.  
  311. Sub Picture2_Resize ()
  312. '---------------------------------------------------
  313. '  Update the widths of the fields and adjust the line
  314. '  controls as needed.
  315. '---------------------------------------------------
  316.     TopLine2.X2 = Picture2.Width
  317.     Picture2.Refresh
  318. End Sub
  319.  
  320. Sub Send_Click ()
  321. '---------------------------------------------------------
  322. '   Place the Subject and Note text into the buffer
  323. '   Add room in the begining for attachment files
  324. '---------------------------------------------------------
  325.     If VBMail.MapiMess.AttachmentCount > 0 Then
  326.         txtNoteText = String$(VBMail.MapiMess.AttachmentCount, "*") + txtNoteText
  327.     End If
  328.     VBMail.MapiMess.MsgSubject = txtSubject
  329.     VBMail.MapiMess.MsgNoteText = txtNoteText
  330.     VBMail.MapiMess.MsgReceiptRequested = ReturnRequest
  331. '---------------------------------------------------------
  332. '   Resolve anems Load Recips into the buffer
  333. '---------------------------------------------------------
  334.     Call CopyNamestoMsgBuffer(Me, True)
  335.                   
  336.     On Error Resume Next
  337.     VBMail.MapiMess.Action = MESSAGE_SEND
  338.     If Err Then
  339.         MsgBox "An error occured during a send: " + Str$(Err)
  340.     Else
  341.         Unload Me
  342.     End If
  343. End Sub
  344.  
  345.