Computer Forums

Member Login

Remember Me? Sign Up! | Forgot Password
 
Slogan
 
Computer Forums > Programmers Lounge > Programming Discussions » Viisual Basic Sendkeys error
Closed Thread
Old 12-01-2005, 10:35 AM   #1 (permalink)
 
Newb Techie

Join Date: Nov 2005

Posts: 3

xenos

Send a message via AIM to xenos
Default Visual Basic Sendkeys error

I'm writing a text editor/psuedo-IDE in Visual Basic and I have a menu option allowing the user to compile java code written in the editor. I'm trying to do this by sending keys to the shell. Here's the code and error after clicking the menu option:

Private Sub mnuJavac_Click()
AppActivate Shell("cmd.exe", vbNormalFocus)
SendKeys "javac " & CommonDialog.filename & "{ENTER}", True
End Sub


Run-time error '5'
Invalid procedure call or argument

The first line "AppActivate...." is highlighted during 'debugging'. The shell starts up but it doesnt send the keys. Any suggestions?
xenos is offline  
 
Closed Thread

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On