VB制作拨号盘
答案:3 悬赏:80 手机版
解决时间 2021-02-19 08:02
- 提问者网友:嗝是迷路的屁
- 2021-02-18 14:06
界面数字键为一个数组,如何实现单击按钮,再现原来的拨号过程,时间间隔为0.5秒
最佳答案
- 五星知识达人网友:玩家
- 2021-02-18 14:43
是不是模拟电话的重拨键?
Dim Hm As String
Dim I As Integer, J As Integer
Dim Qbhm() As String
Private Sub Cmd_Click(Index As Integer)
'按下号码键
Text1 = Text1 & Index
End Sub
Private Sub Command1_Click()
'按下重播键
Hm = Text1.Tag
J = Len(Hm)
ReDim Qbhm(J)
For I = 1 To J
Qbhm(I) = Mid(Hm, I, 1)
Next I
I = 1
Text1 = ""
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
'按下拨号键
Text1.Tag = Text1.Text
'拨号代码
Text1 = ""
End Sub
Private Sub Form_Load()
Text1 = ""
Timer1.Enabled = False
Timer1.Interval = 500
End Sub
Private Sub Timer1_Timer()
Text1 = Text1 & Qbhm(I)
Beep
I = I + 1
If I > J Then
'拨号代码
Timer1.Enabled = False
End If
End Sub
Dim Hm As String
Dim I As Integer, J As Integer
Dim Qbhm() As String
Private Sub Cmd_Click(Index As Integer)
'按下号码键
Text1 = Text1 & Index
End Sub
Private Sub Command1_Click()
'按下重播键
Hm = Text1.Tag
J = Len(Hm)
ReDim Qbhm(J)
For I = 1 To J
Qbhm(I) = Mid(Hm, I, 1)
Next I
I = 1
Text1 = ""
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
'按下拨号键
Text1.Tag = Text1.Text
'拨号代码
Text1 = ""
End Sub
Private Sub Form_Load()
Text1 = ""
Timer1.Enabled = False
Timer1.Interval = 500
End Sub
Private Sub Timer1_Timer()
Text1 = Text1 & Qbhm(I)
Beep
I = I + 1
If I > J Then
'拨号代码
Timer1.Enabled = False
End If
End Sub
全部回答
- 1楼网友:想偏头吻你
- 2021-02-18 16:30
你做这个干什么?
有用吗?
- 2楼网友:孤独入客枕
- 2021-02-18 15:28
(1) 窗体标题为“实验十二:拨号盘”,固定边框。
(2) 窗体的上边有一个文本框text1,设置为最多接受10个字符;font:宋体、粗体、三号;文字颜色为蓝色。
(3) 用命令按钮组command1(0)~ command1(9)构成数字键,数字键标题正好与命令按数组的下标一致。单击数字键按钮,将拨号的内容显示在文本框中。
(4) 单击“重拨”按钮(commmad2),再现原来的拨号过程;(提示:再现过程用定时器实现)。
(5) 定时器的时间间隔设置为0.5秒
我要举报
如以上问答信息为低俗、色情、不良、暴力、侵权、涉及违法等信息,可以点下面链接进行举报!
大家都在看
推荐资讯