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

  1. VERSION 2.00
  2. Begin Form Viewform 
  3.    BorderStyle     =   1  'Fixed Single
  4.    Caption         =   "OGMESSAGE - Message Read "
  5.    ClientHeight    =   4545
  6.    ClientLeft      =   4035
  7.    ClientTop       =   2130
  8.    ClientWidth     =   7350
  9.    ControlBox      =   0   'False
  10.    Height          =   5475
  11.    Icon            =   VIEWFORM.FRX:0000
  12.    Left            =   3975
  13.    LinkMode        =   1  'Source
  14.    LinkTopic       =   "Form2"
  15.    MaxButton       =   0   'False
  16.    MinButton       =   0   'False
  17.    ScaleHeight     =   4545
  18.    ScaleWidth      =   7350
  19.    Top             =   1260
  20.    Width           =   7470
  21.    Begin CommandButton done_btn 
  22.       Caption         =   "&Done"
  23.       Height          =   615
  24.       Left            =   4560
  25.       TabIndex        =   1
  26.       Top             =   3600
  27.       Width           =   1815
  28.    End
  29.    Begin CommandButton reply_btn 
  30.       Caption         =   "&Reply"
  31.       Height          =   615
  32.       Left            =   1560
  33.       TabIndex        =   2
  34.       Top             =   3600
  35.       Width           =   1815
  36.    End
  37.    Begin TextBox Message_read 
  38.       Height          =   3135
  39.       Left            =   240
  40.       MultiLine       =   -1  'True
  41.       ScrollBars      =   2  'Vertical
  42.       TabIndex        =   0
  43.       Top             =   240
  44.       Width           =   7095
  45.    End
  46.    Begin Menu f_men 
  47.       Caption         =   "&File"
  48.       Begin Menu f_save 
  49.          Caption         =   "&Save As "
  50.       End
  51.       Begin Menu f_setup 
  52.          Caption         =   "Set&up"
  53.       End
  54.       Begin Menu f_print 
  55.          Caption         =   "&Print Message"
  56.       End
  57.       Begin Menu f_about 
  58.          Caption         =   "&About"
  59.       End
  60.    End
  61.    Begin Menu e_menu 
  62.       Caption         =   "&Edit"
  63.       Begin Menu e_copy 
  64.          Caption         =   "&Copy"
  65.       End
  66.       Begin Menu e_call 
  67.          Caption         =   "Copy &All"
  68.       End
  69.    End
  70. End
  71. Sub done_btn_Click ()
  72.     viewmsg = False
  73.     Kill maildir + username
  74.     Unload viewform
  75. End Sub
  76.  
  77. Sub e_call_Click ()
  78. clipboard.SetText message_read.text
  79. End Sub
  80.  
  81. Sub e_copy_Click ()
  82. If message_read.sellength = 0 Then
  83.     MsgBox "There is no text selected for Copy", 48
  84. Else
  85.     clipboard.SetText message_read.seltext
  86. End If
  87.  
  88. End Sub
  89.  
  90. Sub f_about_Click ()
  91. about.Show
  92.  
  93. End Sub
  94.  
  95. Sub f_print_Click ()
  96. stuff$ = viewform.message_read.text
  97. printmsg_rtn stuff$
  98.  
  99. End Sub
  100.  
  101. Sub f_save_Click ()
  102. 'This command will save the text currently in the message
  103. 'box to a specified file.
  104.     savetext = message_read.text
  105.     saveit.Show
  106. End Sub
  107.  
  108. Sub f_setup_Click ()
  109. resetup
  110. End Sub
  111.  
  112. Sub Form_Load ()
  113.     viewmsg = True
  114.  
  115.     Open maildir + username For Input As #2
  116.         If LOF(2) > 60000 Then
  117.             msg$ = "Sorry, message is too large to View"
  118.             MsgBox msg$, 16, "File too Big"
  119.             Unload viewform
  120.         End If
  121.     
  122.     loopcnt% = 0
  123.  
  124.     Do Until EOF(2)
  125.         
  126.         Line Input #2, nextline$
  127.         loopcnt% = loopcnt% + 1
  128.         If loopcnt% = 1 Then
  129.             fromname = getfield$(2, "-", nextline$)
  130.         End If
  131.         If loopcnt% = 2 Then   'get subject
  132.  
  133.             default_subj = Right$(nextline$, ((Len(nextline$) - 10)))
  134.         End If
  135.         filebuffer$ = filebuffer$ + nextline$ + Chr$(13) + Chr$(10)
  136.  
  137.     Loop
  138.  
  139.     message_read.text = filebuffer$
  140.     Close #2
  141.  
  142. End Sub
  143.  
  144. Sub Form_Paint ()
  145. If windowstate = 0 Then
  146.     centerwnd viewform
  147. End If
  148.  
  149. End Sub
  150.  
  151. Sub reply_btn_Click ()
  152.     done_btn_Click
  153.     If fromname <> "" Then
  154.         ogsend.select_user_combo.text = fromname
  155.     End If
  156.     ogsend.Show
  157. End Sub
  158.  
  159.