home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / vbmail / editor.frm (.txt) next >
Encoding:
Visual Basic Form  |  1995-09-06  |  5.3 KB  |  194 lines

  1. VERSION 2.00
  2. Begin Form Editor 
  3.    BackColor       =   &H00FFFF00&
  4.    Caption         =   "Mail Message Editor"
  5.    ClientHeight    =   4425
  6.    ClientLeft      =   945
  7.    ClientTop       =   1350
  8.    ClientWidth     =   7650
  9.    FontBold        =   -1  'True
  10.    FontItalic      =   0   'False
  11.    FontName        =   "Courier"
  12.    FontSize        =   9.75
  13.    FontStrikethru  =   0   'False
  14.    FontUnderline   =   0   'False
  15.    Height          =   5115
  16.    Icon            =   EDITOR.FRX:0000
  17.    Left            =   885
  18.    LinkMode        =   1  'Source
  19.    LinkTopic       =   "Form1"
  20.    MaxButton       =   0   'False
  21.    ScaleHeight     =   4425
  22.    ScaleWidth      =   7650
  23.    Top             =   720
  24.    Width           =   7770
  25.    Begin TextBox MsgText 
  26.       FontBold        =   -1  'True
  27.       FontItalic      =   0   'False
  28.       FontName        =   "MS Sans Serif"
  29.       FontSize        =   9.75
  30.       FontStrikethru  =   0   'False
  31.       FontUnderline   =   0   'False
  32.       Height          =   2985
  33.       Left            =   255
  34.       MultiLine       =   -1  'True
  35.       ScrollBars      =   2  'Vertical
  36.       TabIndex        =   0
  37.       Top             =   1200
  38.       Width           =   7200
  39.    End
  40.    Begin Frame Frame1 
  41.       BackColor       =   &H00FFFF00&
  42.       Caption         =   "00/00/00, From: Al Stevens"
  43.       Height          =   1155
  44.       Left            =   255
  45.       TabIndex        =   1
  46.       Top             =   60
  47.       Width           =   7200
  48.       Begin TextBox MsgSubj 
  49.          Height          =   330
  50.          Left            =   705
  51.          TabIndex        =   5
  52.          Top             =   720
  53.          Width           =   4755
  54.       End
  55.       Begin TextBox MsgTo 
  56.          Height          =   315
  57.          Left            =   705
  58.          TabIndex        =   4
  59.          Top             =   345
  60.          Width           =   3315
  61.       End
  62.       Begin Label Label4 
  63.          BackColor       =   &H00FFFF00&
  64.          Caption         =   "Subj:"
  65.          Height          =   255
  66.          Left            =   150
  67.          TabIndex        =   3
  68.          Top             =   750
  69.          Width           =   480
  70.       End
  71.       Begin Label Label3 
  72.          BackColor       =   &H00FFFF00&
  73.          Caption         =   "To:"
  74.          Height          =   255
  75.          Left            =   150
  76.          TabIndex        =   2
  77.          Top             =   390
  78.          Width           =   390
  79.       End
  80.    End
  81.    Begin Menu ID_FILE 
  82.       Caption         =   "&File"
  83.       Begin Menu ID_OPEN 
  84.          Caption         =   "&Open..."
  85.          Begin Menu ID_MAILBOX 
  86.             Caption         =   "&Mailbox"
  87.          End
  88.          Begin Menu ID_MAILFILES 
  89.             Caption         =   "&Mail &Files"
  90.          End
  91.          Begin Menu ID_ADDRBOOK 
  92.             Caption         =   "&Address Book"
  93.          End
  94.       End
  95.       Begin Menu ID_SEND 
  96.          Caption         =   "&Send"
  97.          Shortcut        =   ^S
  98.       End
  99.       Begin Menu ID_DELETE 
  100.          Caption         =   "&Delete"
  101.       End
  102.       Begin Menu menuspace 
  103.          Caption         =   "-"
  104.       End
  105.       Begin Menu ID_EXIT 
  106.          Caption         =   "E&xit"
  107.       End
  108.    End
  109.    Begin Menu ID_EDIT 
  110.       Caption         =   "&Edit"
  111.       Begin Menu ID_CUT 
  112.          Caption         =   "Cu&t           Shift+Del"
  113.       End
  114.       Begin Menu ID_COPY 
  115.          Caption         =   "&Copy        Ctrl+Ins"
  116.       End
  117.       Begin Menu ID_PASTE 
  118.          Caption         =   "&Paste       Shift+Ins"
  119.       End
  120.       Begin Menu ID_DEL 
  121.          Caption         =   "&Delete      Del"
  122.       End
  123.    End
  124. DefInt A-Z
  125. Sub Form_Load ()
  126.     MsgText.Text = ""
  127.     MsgTo.Text = ""
  128.     MsgSubj.Text = ""
  129.     Frame1.Caption = MakeDate(Date$) + ", From: " + MyUserName
  130. End Sub
  131. Sub Form_Unload (Cancel As Integer)
  132.     LoadMailBox "MSG"
  133. End Sub
  134. ' ---- File/Open/Address Book Menu Command
  135. Sub ID_ADDRBOOK_Click ()
  136.     AddrBook.Show MODAL
  137.     If AddrUserName <> "" Then
  138.         Editor.MsgTo.Text = AddrUserName
  139.     End If
  140. End Sub
  141. ' ---- Edit/Copy Menu Command
  142. Sub ID_COPY_Click ()
  143.     SendKeys "^{INSERT}"
  144. End Sub
  145. ' ---- Edit/Cut Menu Command
  146. Sub ID_CUT_Click ()
  147.     SendKeys "+{DEL}"
  148. End Sub
  149. ' ---- Edit/Delete Menu Command
  150. Sub ID_DEL_Click ()
  151.     SendKeys "{DEL}"
  152. End Sub
  153. ' ---- File/Delete Menu Command
  154. Sub ID_DELETE_Click ()
  155.     If MsgBox("Delete Message?", MB_YESNO, "E-Mail") = IDYES Then
  156.         MsgTo.Text = ""
  157.         MsgSubj.Text = ""
  158.         MsgText.Text = ""
  159.         MsgTo.SetFocus
  160.     End If
  161. End Sub
  162. ' ---- Edit Menubar Selection
  163. Sub ID_EDIT_Click ()
  164.     If MsgText.SelLength <> 0 Then
  165.         Blk = True
  166.     End If
  167.     ID_CUT.Enabled = Blk
  168.     ID_COPY.Enabled = Blk
  169.     ID_DEL.Enabled = Blk
  170.     ID_PASTE.Enabled = ClipBoard.GetFormat(CF_TEXT)
  171. End Sub
  172. ' ---- File/Exit Menu Command
  173. Sub ID_EXIT_Click ()
  174.     Unload Editor
  175. End Sub
  176. ' ---- File/Open/Mailbox Menu Command
  177. Sub ID_MAILBOX_Click ()
  178.     Editor.Hide
  179.     LoadMailBox "MSG"
  180. End Sub
  181. ' ---- File/Open/Mail Files Menu Command
  182. Sub ID_MAILFILES_Click ()
  183.     Editor.Hide
  184.     LoadMailBox "FIL"
  185. End Sub
  186. ' ---- Edit/Paste Menu Command
  187. Sub ID_PASTE_Click ()
  188.     SendKeys "+{INSERT}"
  189. End Sub
  190. ' ---- File/Send Menu Command
  191. Sub ID_SEND_Click ()
  192.     SendMail MsgTo.Text, MsgSubj.Text, MsgText.Text, True
  193. End Sub
  194.