|
-
Apr 14th, 2011, 03:43 PM
#1
Thread Starter
Hyperactive Member
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
-
Apr 19th, 2011, 11:34 AM
#2
Thread Starter
Hyperactive Member
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
-
Apr 19th, 2011, 11:40 AM
#3
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?
-
Apr 19th, 2011, 11:52 AM
#4
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|