|
-
Aug 23rd, 2000, 03:32 AM
#1
Thread Starter
Addicted Member
Joacim,
I am also using this code and it works fantastic !
Ecxept I have some other problem:
- When the Dos program is running and some other (windows) program is started, then the (shelled) Dos program is losing his focus and stops running. Is it possible the keep the Dos program running until it is ended ?
(I am using it to send a fax from the Dos commandline and redirect the output to a file)
with regards, Kars
-
Aug 23rd, 2000, 05:30 AM
#2
I've never had that kind of trouble with the code. It might be the program you are shelling that couses this. Try e-mailing me the code you use and I see if I can come up with something.
-
Aug 24th, 2000, 09:33 AM
#3
I can't see any thing wrong with the code. BTW I didn't get any mail from you. You could try to e-mail me again and send the SSFAXER.EXE file.
E-mail it to this address:
[email protected]
Best regards
-
Aug 24th, 2000, 09:34 AM
#4
Hmmm....
How could my answer end up before your question?????
-
Aug 24th, 2000, 09:35 AM
#5
Thread Starter
Addicted Member
ShellAndWait
Joacim, here is the code that I am using, I have send you a e-mail but maybe you did not recieved it ?
The DOS (fax)program 'SSFAXER.EXE' is the shelled program (I can send it to you).
Regards, Kars Lensen
'IN A FORM:
Private Sub Form_Load()
DOS$ = "C:\SSFAXER.EXE 2 T" 'Dos program
FAX$ = "0123-123456 " 'Phone(fax)number
FILE$ = "C:\Autoexec.bat" 'to send file
List$ = " > c:\fax.lst" 're-direct file
MsgBox DOS$ & FAX$ & FILE$ & List$
'make a batch-file
iFile = FreeFile
Open "C:\fax.bat" For Output As iFile
Print #iFile, DOS$ & FAX$ & FILE$ & List$
Close #iFile
Dim sCmd As String
sCmd = Environ("COMSPEC") & " /C "
sCmd = sCmd & "c:\fax.bat"
ShellAndWait sCmd, vbNormalFocus 'vbHide
End Sub
-
Sep 19th, 2000, 11:23 AM
#6
Lively Member
ShellAndWait not returning focus
I am running the ShellAndWait (like in the posted msgs) to execute a BAT file. My VB app never gets focus returned to it after the BAT file has finished processing. I am executing the BAT file using the Environ("COMSPEC") & " /C " line...
Any ideas?
Thanks!
-
Sep 21st, 2000, 02:00 AM
#7
Try calling AppActivate after the call to ShellAndWait.
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
|