home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Programming Tool Box
/
SIMS_2.iso
/
code
/
network
/
ogmess
/
ogsend.frm
< prev
next >
Wrap
Text File
|
1995-02-27
|
6KB
|
236 lines
VERSION 2.00
Begin Form OGSEND
Caption = "OGMESSAGE -Send"
ClientHeight = 4845
ClientLeft = 1860
ClientTop = 2610
ClientWidth = 7545
Height = 5775
Icon = OGSEND.FRX:0000
Left = 1800
LinkMode = 1 'Source
LinkTopic = "Form1"
ScaleHeight = 4845
ScaleWidth = 7545
Top = 1740
Width = 7665
Begin CommandButton Cancel_btn
Cancel = -1 'True
Caption = "&Cancel"
Height = 615
Left = 4200
TabIndex = 4
Top = 4080
Width = 1455
End
Begin CommandButton Send_Cmd
Caption = "&Send"
Height = 615
Left = 1320
TabIndex = 3
Top = 4080
Width = 1335
End
Begin TextBox Message_entry
Height = 2295
Left = 120
MultiLine = -1 'True
ScrollBars = 2 'Vertical
TabIndex = 2
Top = 1560
Width = 7095
End
Begin TextBox subj
Height = 375
Left = 2040
TabIndex = 1
Top = 720
Width = 5175
End
Begin ComboBox Select_user_combo
Height = 300
Left = 2040
TabIndex = 0
Top = 240
Width = 2295
End
Begin Label Label2
Caption = "MESSAGE"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 3120
TabIndex = 6
Top = 1200
Width = 1215
End
Begin Label Label3
Caption = "Subject:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 840
TabIndex = 7
Top = 840
Width = 975
End
Begin Label Label1
Caption = "Send to:"
FontBold = -1 'True
FontItalic = 0 'False
FontName = "MS Sans Serif"
FontSize = 8.25
FontStrikethru = 0 'False
FontUnderline = 0 'False
Height = 255
Left = 840
TabIndex = 5
Top = 240
Width = 975
End
Begin Menu f_menu
Caption = "&File"
Begin Menu f_save
Caption = "&Save Message As"
End
Begin Menu f_setup
Caption = "Set&up"
End
Begin Menu f_print
Caption = "&Print"
End
Begin Menu f_about
Caption = "&About"
End
End
Begin Menu e_menu
Caption = "&Edit"
Begin Menu e_cut
Caption = "C&ut"
End
Begin Menu e_copy
Caption = "&Copy"
End
Begin Menu e_call
Caption = "Copy &All"
End
Begin Menu e_paste
Caption = "&Paste"
End
End
End
Sub cancel_btn_Click ()
'This procedure ends the whold program
Unload ogsend
greeting.SetFocus
greeting.windowstate = 1
End Sub
Sub e_call_Click ()
clipboard.SetText message_entry.text
End Sub
Sub e_copy_Click ()
If message_entry.sellength > 0 Then
clipboard.SetText message_entry.seltext
Else
MsgBox "No Text Currently Selected", 48
End If
End Sub
Sub e_cut_Click ()
If message_entry.sellength > 0 Then
clipboard.SetText message_entry.seltext
message_entry.seltext = ""
Else
MsgBox "No Text Currently Selected", 48
End If
End Sub
Sub e_paste_Click ()
message_entry.seltext = clipboard.GetText()
End Sub
Sub f_about_Click ()
about.Show
End Sub
Sub f_print_Click ()
stuff$ = message_entry.text
printmsg_rtn stuff$
End Sub
Sub f_save_Click ()
savetext = message_entry.text
saveit.Show
End Sub
Sub f_setup_Click ()
resetup
End Sub
Sub Form_Load ()
'
windowstate = 0
Open maildir + "users" For Input As #3
Do Until EOF(3)
Input #3, newname$
select_user_combo.AddItem newname$
Loop
select_user_combo.text = select_user_combo.list(0)
Close #3
Open namefile For Input As #3
Input #3, sendname
Close #3
subj.text = default_subj
End Sub
Sub Form_Paint ()
If windowstate = 0 Then
centerwnd ogsend
End If
End Sub
Sub send_cmd_Click ()
sndusr$ = select_user_combo.text
default_subj = subj.text
If message_entry.text = "" Then
MsgBox "ERROR - No Message Text or Subject", 48, "OGMESS Send Error"
message_entry.SetFocus
Exit Sub
Else
Open maildir + sndusr$ For Append As #1
Print #1, "Message From -" + sendname + "-"; Space$(1) + Date$ + " - " + Time$
Print #1, "Subject : " + subj.text
Print #1, " "
Print #1, message_entry.text
Print #1, " "
Print #1, "============= E N D O F M E S S A G E =========="
Close #1
MsgBox "Message sent to " + sndusr$, 0, "OGMESSAGE"
Unload ogsend
End If
End Sub