Results 1 to 4 of 4

Thread: Converting from VB6 to .net

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Location
    South Africa
    Posts
    400

    Converting from VB6 to .net

    Hi All

    I'm currently converting a VB6 app to vb.net 2010 and i'm struggling to convert the following code and was hoping that someone could assist me. Im rather new to .Net

    Code:
    If Workstation.Slip_Port = "" Then
                    Open "\\" & Workstation.Comp_Name & "\" & Workstation.Slip_Printer For Output As #filenum
                Else
                    Open Workstation.Slip_Port For Output As filenum
                End If
    Its to communicate to a shared network printer, it works perfectly in vb6.
    The problem here is in open "\\" and the output as #filenum parts.

    Thanks

    AJ

  2. #2

    Thread Starter
    Hyperactive Member
    Join Date
    Jul 2005
    Location
    South Africa
    Posts
    400

    Re: Converting from VB6 to .net

    Hi All

    Is this type of method not possible in .Net ?
    I can do it for a local printer but am struggling with the network or Shared printer as this will have a UNC path.

    Thanks
    AJ

  3. #3
    Master Of Orion ForumAccount's Avatar
    Join Date
    Jan 2009
    Location
    Canada
    Posts
    2,802

    Re: Converting from VB6 to .net

    As far as I know, doing it for a local printer is the same as a shared printer. All you would do is set the printer name to the full UNC path name. But I guess the question really is, how are you currently printing to the local printer? Are you using the PrintDialog and PrintDocument classes?

  4. #4
    Frenzied Member
    Join Date
    May 2006
    Location
    some place in the cloud
    Posts
    1,886

    Re: Converting from VB6 to .net

    Read the next link's content, maybe it can be helpful to resolve your problem
    http://support.microsoft.com/kb/322090/en-us

    JG

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