home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / code / network / ogmess / viewform.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1995-02-27  |  3.6 KB  |  136 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. Sub done_btn_Click ()
  71.     viewmsg = False
  72.     Kill maildir + username
  73.     Unload viewform
  74. End Sub
  75. Sub e_call_Click ()
  76. clipboard.SetText message_read.text
  77. End Sub
  78. Sub e_copy_Click ()
  79. If message_read.sellength = 0 Then
  80.     MsgBox "There is no text selected for Copy", 48
  81.     clipboard.SetText message_read.seltext
  82. End If
  83. End Sub
  84. Sub f_about_Click ()
  85. about.Show
  86. End Sub
  87. Sub f_print_Click ()
  88. stuff$ = viewform.message_read.text
  89. printmsg_rtn stuff$
  90. End Sub
  91. Sub f_save_Click ()
  92. 'This command will save the text currently in the message
  93. 'box to a specified file.
  94.     savetext = message_read.text
  95.     saveit.Show
  96. End Sub
  97. Sub f_setup_Click ()
  98. resetup
  99. End Sub
  100. Sub Form_Load ()
  101.     viewmsg = True
  102.     Open maildir + username For Input As #2
  103.         If LOF(2) > 60000 Then
  104.             msg$ = "Sorry, message is too large to View"
  105.             MsgBox msg$, 16, "File too Big"
  106.             Unload viewform
  107.         End If
  108.     loopcnt% = 0
  109.     Do Until EOF(2)
  110.         
  111.         Line Input #2, nextline$
  112.         loopcnt% = loopcnt% + 1
  113.         If loopcnt% = 1 Then
  114.             fromname = getfield$(2, "-", nextline$)
  115.         End If
  116.         If loopcnt% = 2 Then   'get subject
  117.             default_subj = Right$(nextline$, ((Len(nextline$) - 10)))
  118.         End If
  119.         filebuffer$ = filebuffer$ + nextline$ + Chr$(13) + Chr$(10)
  120.     Loop
  121.     message_read.text = filebuffer$
  122.     Close #2
  123. End Sub
  124. Sub Form_Paint ()
  125. If windowstate = 0 Then
  126.     centerwnd viewform
  127. End If
  128. End Sub
  129. Sub reply_btn_Click ()
  130.     done_btn_Click
  131.     If fromname <> "" Then
  132.         ogsend.select_user_combo.text = fromname
  133.     End If
  134.     ogsend.Show
  135. End Sub
  136.