Here is my code for this program I have made when run it opens another external .exe in shell and sends keystrokes to it. This works in Windows 98 and Windows ME, but my beta tester that was on Windows 2000 got this error: Run-Time error '6' overflow
Code:Private Sub Command1_Click() End 'closes me End Sub Private Sub Form_Load() Dim ID ID = Shell("bin/setup2.pif", vbHide) 'opens dos app setup2.exe in bin folder Timer1.Enabled = True 'begins timer 1 Timer2.Enabled = True 'begins timer 2 End Sub Private Sub Timer1_Timer() AppActivate "Cleaner" ' Sets sendkey window to cleaner SendKeys "{Tab}", True 'sends tab stroke SendKeys "{Tab}", True 'sends tab stroke SendKeys "{ }", True 'sends space stroke SendKeys "{Tab}", True 'sends tab stoke SendKeys "{Tab}", True 'sends tab stroke SendKeys "{Tab}", True 'sends tab stroke SendKeys "{ }", True 'sends space stroke Timer1.Enabled = False 'disables timer 1 from looping End Sub Private Sub Timer2_Timer() Dim ID ID = Shell("bin/setup.exe", 1) 'opens setup.exe in bin folder Timer2.Enabled = False 'disables timer 2 from looping End Sub Private Sub Form_Paint() 'tiles image1 on background of form1 Dim x As Integer, y As Integer Dim ImgWidth As Integer Dim ImgHeight As Integer Dim FrmWidth As Integer Dim FrmHeight As Integer ImgWidth = Image1.Width ImgHeight = Image1.Height FrmWidth = Form1.Width FrmHeight = Form1.Height For x = 0 To FrmWidth Step ImgWidth For y = 0 To FrmHeight Step ImgHeight PaintPicture Image1, x, y Next y Next x End Sub
What is causing this to happen? The appactivate? Send keys?
He said that my form opens up and that setup2.exe does execute once its open and the 'sendkeys' should occur he gets that error. What can be done?
Plat




Reply With Quote