home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / network / ogmess / ogsend.frm < prev    next >
Text File  |  1995-02-27  |  6KB  |  236 lines

  1. VERSION 2.00
  2. Begin Form OGSEND 
  3.    Caption         =   "OGMESSAGE -Send"
  4.    ClientHeight    =   4845
  5.    ClientLeft      =   1860
  6.    ClientTop       =   2610
  7.    ClientWidth     =   7545
  8.    Height          =   5775
  9.    Icon            =   OGSEND.FRX:0000
  10.    Left            =   1800
  11.    LinkMode        =   1  'Source
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   4845
  14.    ScaleWidth      =   7545
  15.    Top             =   1740
  16.    Width           =   7665
  17.    Begin CommandButton Cancel_btn 
  18.       Cancel          =   -1  'True
  19.       Caption         =   "&Cancel"
  20.       Height          =   615
  21.       Left            =   4200
  22.       TabIndex        =   4
  23.       Top             =   4080
  24.       Width           =   1455
  25.    End
  26.    Begin CommandButton Send_Cmd 
  27.       Caption         =   "&Send"
  28.       Height          =   615
  29.       Left            =   1320
  30.       TabIndex        =   3
  31.       Top             =   4080
  32.       Width           =   1335
  33.    End
  34.    Begin TextBox Message_entry 
  35.       Height          =   2295
  36.       Left            =   120
  37.       MultiLine       =   -1  'True
  38.       ScrollBars      =   2  'Vertical
  39.       TabIndex        =   2
  40.       Top             =   1560
  41.       Width           =   7095
  42.    End
  43.    Begin TextBox subj 
  44.       Height          =   375
  45.       Left            =   2040
  46.       TabIndex        =   1
  47.       Top             =   720
  48.       Width           =   5175
  49.    End
  50.    Begin ComboBox Select_user_combo 
  51.       Height          =   300
  52.       Left            =   2040
  53.       TabIndex        =   0
  54.       Top             =   240
  55.       Width           =   2295
  56.    End
  57.    Begin Label Label2 
  58.       Caption         =   "MESSAGE"
  59.       FontBold        =   -1  'True
  60.       FontItalic      =   0   'False
  61.       FontName        =   "MS Sans Serif"
  62.       FontSize        =   8.25
  63.       FontStrikethru  =   0   'False
  64.       FontUnderline   =   0   'False
  65.       Height          =   255
  66.       Left            =   3120
  67.       TabIndex        =   6
  68.       Top             =   1200
  69.       Width           =   1215
  70.    End
  71.    Begin Label Label3 
  72.       Caption         =   "Subject:"
  73.       FontBold        =   -1  'True
  74.       FontItalic      =   0   'False
  75.       FontName        =   "MS Sans Serif"
  76.       FontSize        =   8.25
  77.       FontStrikethru  =   0   'False
  78.       FontUnderline   =   0   'False
  79.       Height          =   255
  80.       Left            =   840
  81.       TabIndex        =   7
  82.       Top             =   840
  83.       Width           =   975
  84.    End
  85.    Begin Label Label1 
  86.       Caption         =   "Send to:"
  87.       FontBold        =   -1  'True
  88.       FontItalic      =   0   'False
  89.       FontName        =   "MS Sans Serif"
  90.       FontSize        =   8.25
  91.       FontStrikethru  =   0   'False
  92.       FontUnderline   =   0   'False
  93.       Height          =   255
  94.       Left            =   840
  95.       TabIndex        =   5
  96.       Top             =   240
  97.       Width           =   975
  98.    End
  99.    Begin Menu f_menu 
  100.       Caption         =   "&File"
  101.       Begin Menu f_save 
  102.          Caption         =   "&Save Message As"
  103.       End
  104.       Begin Menu f_setup 
  105.          Caption         =   "Set&up"
  106.       End
  107.       Begin Menu f_print 
  108.          Caption         =   "&Print"
  109.       End
  110.       Begin Menu f_about 
  111.          Caption         =   "&About"
  112.       End
  113.    End
  114.    Begin Menu e_menu 
  115.       Caption         =   "&Edit"
  116.       Begin Menu e_cut 
  117.          Caption         =   "C&ut"
  118.       End
  119.       Begin Menu e_copy 
  120.          Caption         =   "&Copy"
  121.       End
  122.       Begin Menu e_call 
  123.          Caption         =   "Copy &All"
  124.       End
  125.       Begin Menu e_paste 
  126.          Caption         =   "&Paste"
  127.       End
  128.    End
  129. End
  130. Sub cancel_btn_Click ()
  131.  
  132. 'This procedure ends the whold program
  133. Unload ogsend
  134. greeting.SetFocus
  135. greeting.windowstate = 1
  136.  
  137. End Sub
  138.  
  139. Sub e_call_Click ()
  140. clipboard.SetText message_entry.text
  141. End Sub
  142.  
  143. Sub e_copy_Click ()
  144. If message_entry.sellength > 0 Then
  145.     clipboard.SetText message_entry.seltext
  146. Else
  147.     MsgBox "No Text Currently Selected", 48
  148. End If
  149. End Sub
  150.  
  151. Sub e_cut_Click ()
  152. If message_entry.sellength > 0 Then
  153.     clipboard.SetText message_entry.seltext
  154.     message_entry.seltext = ""
  155. Else
  156.     MsgBox "No Text Currently Selected", 48
  157. End If
  158.  
  159.  
  160. End Sub
  161.  
  162. Sub e_paste_Click ()
  163. message_entry.seltext = clipboard.GetText()
  164. End Sub
  165.  
  166. Sub f_about_Click ()
  167. about.Show
  168. End Sub
  169.  
  170. Sub f_print_Click ()
  171. stuff$ = message_entry.text
  172. printmsg_rtn stuff$
  173. End Sub
  174.  
  175. Sub f_save_Click ()
  176. savetext = message_entry.text
  177. saveit.Show
  178. End Sub
  179.  
  180. Sub f_setup_Click ()
  181. resetup
  182. End Sub
  183.  
  184. Sub Form_Load ()
  185. '
  186.  
  187.     
  188.  
  189.     windowstate = 0
  190.     Open maildir + "users" For Input As #3
  191.     Do Until EOF(3)
  192.         Input #3, newname$
  193.         select_user_combo.AddItem newname$
  194.     Loop
  195.     select_user_combo.text = select_user_combo.list(0)
  196.     Close #3
  197.     Open namefile For Input As #3
  198.     Input #3, sendname
  199.     Close #3
  200.  
  201.      subj.text = default_subj
  202. End Sub
  203.  
  204. Sub Form_Paint ()
  205. If windowstate = 0 Then
  206. centerwnd ogsend
  207. End If
  208. End Sub
  209.  
  210. Sub send_cmd_Click ()
  211.     
  212.     sndusr$ = select_user_combo.text
  213.     default_subj = subj.text
  214.  
  215. If message_entry.text = "" Then
  216.  
  217.      MsgBox "ERROR - No Message Text or Subject", 48, "OGMESS Send Error"
  218.      message_entry.SetFocus
  219.      Exit Sub
  220. Else
  221.  
  222.     Open maildir + sndusr$ For Append As #1
  223.         Print #1, "Message From -" + sendname + "-"; Space$(1) + Date$ + " - " + Time$
  224.         Print #1, "Subject : " + subj.text
  225.         Print #1, " "
  226.         Print #1, message_entry.text
  227.         Print #1, " "
  228.         Print #1, "============= E N D   O F   M E S S A G E =========="
  229.     Close #1
  230.     MsgBox "Message sent to " + sndusr$, 0, "OGMESSAGE"
  231.     Unload ogsend
  232.  
  233. End If
  234. End Sub
  235.  
  236.