home *** CD-ROM | disk | FTP | other *** search
/ QBasic & Borland Pascal & C / Delphi5.iso / Basic / Visual Basic.60 / COMMON / TOOLS / VB / MSAGENT / SAMPLES / VBHELLO / HELLO.FRM (.txt) next >
Encoding:
Visual Basic Form  |  1998-02-06  |  1.7 KB  |  53 lines

  1. VERSION 5.00
  2. Object = "{F5BE8BC2-7DE6-11D0-91FE-00C04FD701A5}#1.5#0"; "AGENTCTL.DLL"
  3. Begin VB.Form Form1 
  4.    Caption         =   "Hello, World"
  5.    ClientHeight    =   1680
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   4680
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   1680
  11.    ScaleWidth      =   4680
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.TextBox TextBox 
  14.       Appearance      =   0  'Flat
  15.       Height          =   615
  16.       Left            =   240
  17.       MultiLine       =   -1  'True
  18.       TabIndex        =   1
  19.       ToolTipText     =   "Type something in here for the Genie to say, then press the Say it! button"
  20.       Top             =   120
  21.       Width           =   4335
  22.    End
  23.    Begin VB.CommandButton Button 
  24.       Caption         =   "Say it!"
  25.       Height          =   495
  26.       Left            =   1920
  27.       TabIndex        =   0
  28.       ToolTipText     =   "Type some text into the text box, then press this button to hear Genie say it"
  29.       Top             =   960
  30.       Width           =   1215
  31.    End
  32.    Begin AgentObjectsCtl.Agent Agent1 
  33.       Left            =   480
  34.       Top             =   960
  35.    End
  36. Attribute VB_Name = "Form1"
  37. Attribute VB_GlobalNameSpace = False
  38. Attribute VB_Creatable = False
  39. Attribute VB_PredeclaredId = True
  40. Attribute VB_Exposed = False
  41. Dim Genie As IAgentCtlCharacter
  42. Const DATAPATH = "\windows\msagent\chars\genie.acs"
  43. Private Sub Form_Load()
  44.     Agent1.Characters.Load "Genie", DATAPATH
  45.     Set Genie = Agent1.Characters("Genie")
  46.     TextBox.Text = "Hello World!"
  47. End Sub
  48. Private Sub Button_Click()
  49.     Genie.Show
  50.     Genie.Speak TextBox.Text
  51.     Genie.Hide
  52. End Sub
  53.