VERSION 4.00 Begin VB.Form Form1 AutoRedraw = -1 'True Caption = "Form1" ClientHeight = 2700 ClientLeft = 3645 ClientTop = 8130 ClientWidth = 2385 Height = 3210 Left = 3585 LinkTopic = "Form1" ScaleHeight = 2700 ScaleWidth = 2385 Top = 7680 Width = 2505 Begin VB.CommandButton Counter Caption = "Counter" Height = 615 Left = 600 TabIndex = 1 Top = 1440 Width = 1215 End Begin VB.CommandButton EXIT Caption = "EXIT" Height = 615 Left = 600 TabIndex = 0 Top = 600 Width = 1215 End End Attribute VB_Name = "Form1" Attribute VB_Creatable = False Attribute VB_Exposed = False Public Calculator Private Sub Form_Load() Msg = "C:\WINDOWS\CALC.EXE" Calculator = Shell(Msg, 4) Form1.Show End Sub Private Sub EXIT_Click() AppActivate Calculator SendKeys "%{F4}", True End End Sub Private Sub Counter_Click() AppActivate Calculator SendKeys "0{+}1=", True While 1 Z = Timer While Z + 1 > Timer DoEvents Wend SendKeys "=", True Wend End Sub