www.pudn.com > TELEPHONE.rar > Form1.frm, change:2008-04-28,size:1542b


VERSION 5.00 
Begin VB.Form Form1  
   Caption         =   "Form1" 
   ClientHeight    =   7980 
   ClientLeft      =   60 
   ClientTop       =   450 
   ClientWidth     =   8565 
   LinkTopic       =   "Form1" 
   ScaleHeight     =   7980 
   ScaleWidth      =   8565 
   StartUpPosition =   3  'ȱʡ 
   Begin VB.CommandButton Command1  
      Caption         =   "" 
      Height          =   615 
      Left            =   6360 
      TabIndex        =   1 
      Top             =   480 
      Width           =   1575 
   End 
   Begin VB.TextBox txtInfo  
      Height          =   6855 
      Left            =   360 
      MultiLine       =   -1  'True 
      ScrollBars      =   2  'Vertical 
      TabIndex        =   0 
      Top             =   480 
      Width           =   5535 
   End 
End 
Attribute VB_Name = "Form1" 
Attribute VB_GlobalNameSpace = False 
Attribute VB_Creatable = False 
Attribute VB_PredeclaredId = True 
Attribute VB_Exposed = False 
Const MAX_CNT = 512 
 
Private Sub Command1_Click() 
    Dim i As Long 
    Dim t As Double 
    For i = 0 To MAX_CNT - 1 
        t = Sin(3.14159265758 * 2# * CDbl(i) / 128) 'CDbl(MAX_CNT)) 
        t = t * 127 + 128 
        s = Sin(3.14159265758 * 2# * CDbl(i) * 1209 / 697 / 128) 'CDbl(MAX_CNT))) 
        s = s * 127 + 128 
        x = (t + s) \ 2 
       'txtInfo.Text = txtInfo.Text + vbTab + Str(i) + ":" + Str(CInt(t)) + Str(CInt(s)) + Str(CInt(x)) + ";" + vbCrLf 
       txtInfo.Text = txtInfo.Text + vbTab + Str(CInt(x)) + vbCrLf 
    Next 
End Sub