|
-
Mar 22nd, 2008, 02:06 PM
#10
PowerPoster
Re: Loading .exe form - Brings up x2 not 1
 Originally Posted by bubblegum_girl
I did try the code from the website suggested by MartinLiss but I got it wrapped around my head
I copied the private decs and put them at the top of the form. I then copied the fuction ShellandAll and then I done this:
Private Sub CmdSend_Click()
Dim retval
retval = Shell("C:\Program Files\Nokia\Nokia PC Suite 6\TextMessageEditor.exe", vbNormalFocus)
'********************************
SendKeys "abc", 1
SendKeys "{TAB}", 1
SendKeys "Your mesage here", 1
end sub
Where the line of stars are is where I think I needed to call the ShellandAll function to perform the wait but no matter what I tried it wouldn't work
I'm starting to pull my hair out because I keep getting both the different ways wrong and I can't seem to find the way forward
i tested your code with a program that i have(priginal text editor program), and works fine. and only executes 1 time.
other thing i need to know: when you execute the program who win the focus, is the textbox?
heres my change:
Code:
Shell "C:\Documents and Settings\Joaquim\Os meus documentos\Visual Basic 6.0\Cambalinho\Cambalinho.exe", vbNormalFocus
'********************************
SendKeys "abc", 1
SendKeys "{TAB}", 1
SendKeys "Your mesage here", 1
i put these code in command1_click sub...
test the new changes and tell me if it works...
Last edited by joaquim; Mar 22nd, 2008 at 02:10 PM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|