|
-
Aug 7th, 2000, 06:39 PM
#1
Thread Starter
Lively Member
I have written an app that shells a dos program (written in QB),which prints a bunch of stuff to the printer.
When I run this program (the dos program),from dos in the network ,on a computer that is not directly connected to the printer - the program works fine,and printes things to the printer as wanted.
When the program is shelled through my app , ont he same computer ,for some reasone it can not find the printer device and crashes .
The printing program also works when shelled from my app,
on a computer not connected to a network.
Any ideas why this is happening?
Is there an equivelent API command to the "shell" command that will maybe solve the problem?
I think shellexecute but I dont remember the exact sintax.
Tahnks.
Dan.
-
Aug 7th, 2000, 10:58 PM
#2
Fanatic Member
Private Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal opOperation As String, ByVal lpFile As String, ByVal opParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long
' just call it like this ShellExe("Explorer")
Public Sub ShellExe(What As String)
On Error Resume Next
Call ShellExecute(0&, vbNullString, What, vbNullString, vbNullString, vbNormalFocus)
End Sub
Kurt Simons
[I know I'm a hack but my clients don't!]
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
|