home *** CD-ROM | disk | FTP | other *** search
/ Planet Source Code Jumbo …e CD Visual Basic 1 to 7 / 1_2002.ISO / Data / Zips / CODE_UPLOAD174973242001.psc / Form2.frm (.txt) < prev    next >
Encoding:
Visual Basic Form  |  2001-03-25  |  4.9 KB  |  159 lines

  1. VERSION 5.00
  2. Object = "{F5BE8BC2-7DE6-11D0-91FE-00C04FD701A5}#2.0#0"; "AGENTCTL.DLL"
  3. Begin VB.Form Form2 
  4.    BackColor       =   &H8000000D&
  5.    BorderStyle     =   5  'Sizable ToolWindow
  6.    Caption         =   "Expressions"
  7.    ClientHeight    =   5610
  8.    ClientLeft      =   60
  9.    ClientTop       =   300
  10.    ClientWidth     =   3030
  11.    ClipControls    =   0   'False
  12.    LinkTopic       =   "Form2"
  13.    MaxButton       =   0   'False
  14.    MinButton       =   0   'False
  15.    ScaleHeight     =   5610
  16.    ScaleWidth      =   3030
  17.    ShowInTaskbar   =   0   'False
  18.    StartUpPosition =   1  'CenterOwner
  19.    Begin VB.ListBox list1 
  20.       Height          =   4350
  21.       ItemData        =   "Form2.frx":0000
  22.       Left            =   120
  23.       List            =   "Form2.frx":0002
  24.       TabIndex        =   2
  25.       Top             =   240
  26.       Width           =   2775
  27.    End
  28.    Begin VB.CommandButton Command4 
  29.       Caption         =   "Get Merlin to perform and read "
  30.       Default         =   -1  'True
  31.       Height          =   495
  32.       Left            =   120
  33.       TabIndex        =   1
  34.       Top             =   4680
  35.       Width           =   2775
  36.    End
  37.    Begin VB.CommandButton Command3 
  38.       Caption         =   "&Stop Merlin"
  39.       Height          =   255
  40.       Left            =   120
  41.       TabIndex        =   0
  42.       Top             =   5280
  43.       Width           =   2775
  44.    End
  45.    Begin VB.Label Label1 
  46.       BackStyle       =   0  'Transparent
  47.       ForeColor       =   &H8000000E&
  48.       Height          =   255
  49.       Left            =   2640
  50.       TabIndex        =   3
  51.       Top             =   0
  52.       Width           =   855
  53.    End
  54.    Begin AgentObjectsCtl.Agent Agent1 
  55.       Left            =   960
  56.       Top             =   3360
  57.       _cx             =   847
  58.       _cy             =   847
  59.    End
  60. Attribute VB_Name = "Form2"
  61. Attribute VB_GlobalNameSpace = False
  62. Attribute VB_Creatable = False
  63. Attribute VB_PredeclaredId = True
  64. Attribute VB_Exposed = False
  65. Private Sub Command1_Click()
  66. Me.Hide
  67. Form1.Show
  68. End Sub
  69. Private Sub Command2_Click()
  70. Agent1.Characters("merlin").StopAll
  71. Agent1.Characters("merlin").MoveTo 420, 250
  72. Dim i As Integer
  73. For i = 1 To list1.ListCount - 1
  74. Agent1.Characters("merlin").Speak list1.List(i)
  75. Next i
  76. End Sub
  77. Private Sub Command3_Click()
  78. Agent1.Characters("merlin").StopAll
  79. End Sub
  80. Private Sub Command4_Click()
  81. Agent1.Characters("merlin").StopAll
  82. Agent1.Characters("merlin").MoveTo 420, 250
  83. If list1.ListIndex = -1 Then
  84. On Error Resume Next
  85. For i = 1 To list1.ListCount
  86. Agent1.Characters("merlin").Speak list1.List(i)
  87. Agent1.Characters("merlin").Play list1.List(i)
  88. Next i
  89. On Error Resume Next
  90. idx2 = list1.ListIndex
  91. Agent1.Characters("merlin").Speak list1.List(idx2)
  92. Agent1.Characters("merlin").Play list1.List(idx2)
  93. End If
  94. End Sub
  95. Private Sub Form_Load()
  96. On Error Resume Next
  97. Agent1.Characters("merlin").StopAll
  98. Agent1.Characters.Load ("merlin")
  99. Agent1.Characters("merlin").Show
  100. Agent1.Characters("merlin").MoveTo 420, 250
  101. Agent1.Characters("merlin").Speak "You can add an expression to your chat program by Dboule clicking on it."
  102. Agent1.Characters("merlin").Speak "If you would like to see what the epression does, just select it, and then press 'Get Merlin to perform and read' button."
  103. Agent1.Characters("merlin").Speak "To hear and see all of the expressions, do not make any selections, just press the button."
  104. list1.AddItem "Acknowledge"
  105. list1.AddItem "Alert"
  106. list1.AddItem "Announce"
  107. list1.AddItem "Blink"
  108. list1.AddItem "Confused"
  109. list1.AddItem "Congratulate"
  110. list1.AddItem "Congratulate_2"
  111. list1.AddItem "Decline"
  112. list1.AddItem "DoMagic1"
  113. list1.AddItem "DoMagic2"
  114. list1.AddItem "DontRecognize"
  115. list1.AddItem "Explain"
  116. list1.AddItem "GestureDown"
  117. list1.AddItem "GestureLeft"
  118. list1.AddItem "GestureRight"
  119. list1.AddItem "GestureUp"
  120. list1.AddItem "GetAttention"
  121. list1.AddItem "Greet"
  122. list1.AddItem "Hide"
  123. list1.AddItem "Idle1_1"
  124. list1.AddItem "Idle1_2"
  125. list1.AddItem "Idle1_3"
  126. list1.AddItem "LookDown"
  127. list1.AddItem "LookDownBlink"
  128. list1.AddItem "LookLeft"
  129. list1.AddItem "LookLeftBlink"
  130. list1.AddItem "LookRight"
  131. list1.AddItem "LookRightBlink"
  132. list1.AddItem "LookUp"
  133. list1.AddItem "LookUpBlink"
  134. list1.AddItem "MoveDown"
  135. list1.AddItem "MoveLeft"
  136. list1.AddItem "MoveRight"
  137. list1.AddItem "MoveUp"
  138. list1.AddItem "Pleased"
  139. list1.AddItem "Read"
  140. list1.AddItem "ReadContinued"
  141. list1.AddItem "RestPose"
  142. list1.AddItem "Sad"
  143. list1.AddItem "Show"
  144. list1.AddItem "StartListening"
  145. list1.AddItem "StopListening"
  146. list1.AddItem "Suggest"
  147. list1.AddItem "Surprised"
  148. list1.AddItem "Think"
  149. list1.AddItem "Uncertain"
  150. list1.AddItem "Wave"
  151. list1.AddItem "Write"
  152. list1.AddItem "WriteContinued"
  153. Label1.Caption = list1.ListCount
  154. End Sub
  155. Private Sub list1_DblClick()
  156. idx = list1.ListIndex
  157. Form1.Text4.Text = list1.List(idx)
  158. End Sub
  159.