自己编了一个程序,运行时显示错误429,Active X部件不能创建,程序代码如下:Private StopWatch1 As ccrpStopWatchDim one_time As DoubleDim m As IntegerPrivate Sub Form_Keypress(Keyascii As Integer): Dim x As Integer:L1。
Visible = FalseLine1。Visible = True: Line2。Visible = Trueone_time = StopWatch1。Elapsedn = Data1。Recordset("数字"): i = Keyascii: p = n Mod 2:Select Case p Case 0 Select Case i Case 107 Open "d:\结果输出偶数。
txt" For Append As #1 Print #1, n, m, "正确", one_time Close #1 Case 115 Open "d:\结果输出偶数。
txt" For Append As #1 Print #1, n, m, "不正确", one_time Close #1 Case Else Open "d:\结果输出偶数。
txt" For Append As #1 Print #1, n, m, "不正确", one_time Close #1 End Select Case 1 Select Case i Case 107 Open "d:\结果输出奇数。
txt " For Append As #2 Print #2, n, m, "不正确", one_time Close #2 Case 115 Open "d:\结果输出奇数。
txt " For Append As #2 Print #2, n, m, "正确", one_time Close #2 Case Else Open "d:\结果输出奇数。
txt " For Append As #2 Print #2, n, m, "不正确", one_time Close #2 End Select End Select End SubPrivate Sub Form_Load()Form3。
Width = Screen。WidthForm3。Height = Screen。HeightLine1。BorderColor = vbRedLine2。BorderColor = vbRedSet StopWatch1 = New ccrpStopWatchm = 0End SubPrivate Sub Timer1_Timer() Data1。
Recordset。MoveNext L1。Visible = True Line1。Visible = False: Line2。Visible = False m = Int(Rnd * 3 + 1) Select Case m Case 1 Form3。
L1。Left = 0。19 * Form3。Width Form3。L1。Top = 0。35 * Form3。Height Form3。L1。Width = 0。2 * Form3。Width Form3。
L1。Height = 0。3 * Form3。Height Case 2 Form3。L1。Left = 0。5 * Form3。Width Form3。L1。Top = 0。35 * Form3。Height Form3。
L1。Width = 0。5 * Form3。Width Form3。L1。Height = 0。3 * Form3。Height Case 3 Form3。L1。Left = 0。8 * Form3。Width Form3。
L1。Top = 0。35 * Form3。Height Form3。L1。Width = 0。8 * Form3。Width Form3。L1。Height = 0。3 * Form3。Height End Select L1。
Caption = Label2。Caption StopWatch1。Reset If Form3。Data1。Recordset。EOF Then Form2。ShowEnd Sub调试后显示如图。
应该是没有引用ccrpStopWatch库或者部件