📄 form1.frm
字号:
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
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -