Results 1 to 2 of 2

Thread: network printing problem

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Sep 1999
    Location
    u.s.a
    Posts
    127
    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.


  2. #2
    Fanatic Member
    Join Date
    Jul 2000
    Location
    Manchester NH
    Posts
    833
    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
  •  



Click Here to Expand Forum to Full Width