Questo sito utilizza cookies solo per scopi di autenticazione sul sito e nient'altro. Nessuna informazione personale viene tracciata. Leggi l'informativa sui cookies.
Username: Password: oppure
Speaker - Form1.vb

Form1.vb

Caricato da:
Scarica il programma completo

  1. Imports SpeechLib
  2. Public Class Form1
  3.     Inherits System.Windows.Forms.Form
  4.     Dim Data As New SpVoice
  5. #Region " Windows Form Designer generated code "
  6.  
  7.     Public Sub New()
  8.         MyBase.New()
  9.  
  10.         'This call is required by the Windows Form Designer.
  11.         InitializeComponent()
  12.  
  13.         'Add any initialization after the InitializeComponent() call
  14.  
  15.     End Sub
  16.  
  17.     'Form overrides dispose to clean up the component list.
  18.     Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
  19.         If disposing Then
  20.             If Not (components Is Nothing) Then
  21.                 components.Dispose()
  22.             End If
  23.         End If
  24.         MyBase.Dispose(disposing)
  25.     End Sub
  26.  
  27.     'Required by the Windows Form Designer
  28.     Private components As System.ComponentModel.IContainer
  29.  
  30.     'NOTE: The following procedure is required by the Windows Form Designer
  31.     'It can be modified using the Windows Form Designer.  
  32.     'Do not modify it using the code editor.
  33.     Friend WithEvents Label1 As System.Windows.Forms.Label
  34.     Friend WithEvents TextBox1 As System.Windows.Forms.TextBox
  35.     Friend WithEvents Button1 As System.Windows.Forms.Button
  36.     <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
  37.         Me.Label1 = New System.Windows.Forms.Label
  38.         Me.TextBox1 = New System.Windows.Forms.TextBox
  39.         Me.Button1 = New System.Windows.Forms.Button
  40.         Me.SuspendLayout()
  41.         '
  42.         'Label1
  43.         '
  44.         Me.Label1.Location = New System.Drawing.Point(8, 8)
  45.         Me.Label1.Name = "Label1"
  46.         Me.Label1.Size = New System.Drawing.Size(256, 24)
  47.         Me.Label1.TabIndex = 0
  48.         Me.Label1.Text = "Testo Da Riprodurre:"
  49.         '
  50.         'TextBox1
  51.         '
  52.         Me.TextBox1.Location = New System.Drawing.Point(8, 32)
  53.         Me.TextBox1.Name = "TextBox1"
  54.         Me.TextBox1.Size = New System.Drawing.Size(256, 26)
  55.         Me.TextBox1.TabIndex = 1
  56.         Me.TextBox1.Text = "Hello World!"
  57.         '
  58.         'Button1
  59.         '
  60.         Me.Button1.Location = New System.Drawing.Point(8, 64)
  61.         Me.Button1.Name = "Button1"
  62.         Me.Button1.Size = New System.Drawing.Size(256, 24)
  63.         Me.Button1.TabIndex = 2
  64.         Me.Button1.Text = "Riproduci"
  65.         '
  66.         'Form1
  67.         '
  68.         Me.AutoScaleBaseSize = New System.Drawing.Size(7, 19)
  69.         Me.ClientSize = New System.Drawing.Size(274, 96)
  70.         Me.Controls.Add(Me.Button1)
  71.         Me.Controls.Add(Me.TextBox1)
  72.         Me.Controls.Add(Me.Label1)
  73.         Me.Font = New System.Drawing.Font("Comic Sans MS", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
  74.         Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedSingle
  75.         Me.MaximizeBox = False
  76.         Me.MinimizeBox = False
  77.         Me.Name = "Form1"
  78.         Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
  79.         Me.Text = "Speaker - By Citynova"
  80.         Me.ResumeLayout(False)
  81.  
  82.     End Sub
  83.  
  84. #End Region
  85.  
  86.     Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
  87.         Data.Speak(TextBox1.Text, SpeechVoiceSpeakFlags.SVSFDefault)
  88.     End Sub
  89. End Class