home *** CD-ROM | disk | FTP | other *** search
/ Programming Tool Box / SIMS_2.iso / vb_code1 / mailslot / mailslot.frm < prev    next >
Text File  |  1993-09-15  |  6KB  |  199 lines

  1. VERSION 2.00
  2. Begin Form Form1 
  3.    Caption         =   "Form1"
  4.    ClientHeight    =   2670
  5.    ClientLeft      =   3225
  6.    ClientTop       =   1560
  7.    ClientWidth     =   6150
  8.    Height          =   3075
  9.    Left            =   3165
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   2670
  12.    ScaleWidth      =   6150
  13.    Top             =   1215
  14.    Width           =   6270
  15.    Begin Frame Frame1 
  16.       Caption         =   "Peek "
  17.       Height          =   1575
  18.       Left            =   3540
  19.       TabIndex        =   10
  20.       Top             =   435
  21.       Width           =   2430
  22.       Begin Label Label8 
  23.          Caption         =   "NextPriority:"
  24.          Height          =   270
  25.          Left            =   120
  26.          TabIndex        =   6
  27.          Top             =   1050
  28.          Width           =   1035
  29.       End
  30.       Begin Label Label7 
  31.          Caption         =   "NextSize:"
  32.          Height          =   180
  33.          Left            =   135
  34.          TabIndex        =   7
  35.          Top             =   720
  36.          Width           =   840
  37.       End
  38.       Begin Label Label6 
  39.          Caption         =   "Message:"
  40.          Height          =   210
  41.          Left            =   135
  42.          TabIndex        =   14
  43.          Top             =   405
  44.          Width           =   855
  45.       End
  46.       Begin Label Label2 
  47.          Caption         =   "Label2"
  48.          Height          =   240
  49.          Left            =   1260
  50.          TabIndex        =   13
  51.          Top             =   720
  52.          Width           =   1000
  53.       End
  54.       Begin Label Label3 
  55.          Caption         =   "Label3"
  56.          Height          =   240
  57.          Left            =   1260
  58.          TabIndex        =   12
  59.          Top             =   1065
  60.          Width           =   1000
  61.       End
  62.       Begin Label Label4 
  63.          Caption         =   "Label4"
  64.          Height          =   240
  65.          Left            =   1260
  66.          TabIndex        =   11
  67.          Top             =   405
  68.          Width           =   1000
  69.       End
  70.    End
  71.    Begin Timer Timer1 
  72.       Enabled         =   0   'False
  73.       Interval        =   100
  74.       Left            =   2880
  75.       Top             =   1440
  76.    End
  77.    Begin TextBox Text2 
  78.       Height          =   345
  79.       Left            =   120
  80.       TabIndex        =   5
  81.       Text            =   "\mailslot\atest"
  82.       Top             =   480
  83.       Width           =   2535
  84.    End
  85.    Begin CommandButton Command4 
  86.       Caption         =   "Read"
  87.       Height          =   420
  88.       Left            =   1440
  89.       TabIndex        =   4
  90.       Top             =   2040
  91.       Width           =   1215
  92.    End
  93.    Begin CommandButton Command3 
  94.       Caption         =   "Write"
  95.       Enabled         =   0   'False
  96.       Height          =   420
  97.       Left            =   120
  98.       TabIndex        =   2
  99.       Top             =   2040
  100.       Width           =   1215
  101.    End
  102.    Begin CommandButton Command2 
  103.       Caption         =   "Delete"
  104.       Height          =   420
  105.       Left            =   1440
  106.       TabIndex        =   1
  107.       Top             =   960
  108.       Width           =   1215
  109.    End
  110.    Begin VBMailslots Mailslot1 
  111.       Action          =   0
  112.       Left            =   2880
  113.       MailslotName    =   "\mailslot\atest"
  114.       MailslotSize    =   1024
  115.       Message         =   ""
  116.       Messages        =   0
  117.       MessageSize     =   256
  118.       NextPriority    =   0
  119.       NextSize        =   0
  120.       Priority        =   0
  121.       Timeout         =   2005
  122.       Top             =   720
  123.    End
  124.    Begin CommandButton Command1 
  125.       Caption         =   "Make"
  126.       Height          =   420
  127.       Left            =   120
  128.       TabIndex        =   0
  129.       Top             =   960
  130.       Width           =   1215
  131.    End
  132.    Begin Label Label9 
  133.       Caption         =   "Mailslot Name:"
  134.       Height          =   225
  135.       Left            =   120
  136.       TabIndex        =   8
  137.       Top             =   240
  138.       Width           =   1560
  139.    End
  140.    Begin Label Label5 
  141.       Caption         =   "1"
  142.       Height          =   315
  143.       Left            =   120
  144.       TabIndex        =   9
  145.       Top             =   1560
  146.       Width           =   915
  147.    End
  148.    Begin Label Label1 
  149.       Height          =   360
  150.       Left            =   1440
  151.       TabIndex        =   3
  152.       Top             =   1560
  153.       Width           =   1050
  154.    End
  155. End
  156.  
  157. Sub Command1_Click ()
  158.     Mailslot1.MailslotName = Text2.Text
  159.     Mailslot1.Action = 1
  160.     Command3.Enabled = True
  161.     Timer1.Enabled = True
  162. End Sub
  163.  
  164. Sub Command2_Click ()
  165.     Timer1.Enabled = False
  166.     Mailslot1.Message = Label5.Caption
  167.     Mailslot1.Action = 2
  168.     Command3.Enabled = False
  169. End Sub
  170.  
  171. Sub Command3_Click ()
  172.     Mailslot1.MailslotName = Text2.Text
  173.     Mailslot1.Message = Label5.Caption
  174.     Mailslot1.Action = 3
  175.     Label5.Caption = Str(Val(Label5.Caption) + 1)
  176. End Sub
  177.  
  178. Sub Command4_Click ()
  179.     Mailslot1.Message = ""
  180.     Mailslot1.Action = 4
  181.     Label1.Caption = Mailslot1.Message
  182. End Sub
  183.  
  184. Sub Command5_Click ()
  185.     Mailslot1.Message = ""
  186.     Mailslot1.Action = 5
  187.     Label4.Caption = Mailslot1.Message
  188.     Label2.Caption = Str(Mailslot1.NextSize)
  189.     Label3.Caption = Str(Mailslot1.NextPriority)
  190. End Sub
  191.  
  192. Sub Timer1_Timer ()
  193.     Mailslot1.Action = 5
  194.     Label4.Caption = Mailslot1.Message
  195.     Label2.Caption = Str(Mailslot1.NextSize)
  196.     Label3.Caption = Str(Mailslot1.NextPriority)
  197. End Sub
  198.  
  199.