Found it... looks like this:
Private Shared Sub PrintZebraLabel(ByVal ZebraPrinter As String, ByVal
strWriteLabel As String)
'create an instance of the zebra printer
Try
Dim retval As Integer
Dim outfile As FileStream = New
FileStream(CreatePort(ZebraPrinter), FileAccess.ReadWrite)
Dim fileWriter As New StreamWriter(outfile) '(instance)
fileWriter.WriteLine(strWriteLabel)
fileWriter.Flush()
fileWriter.Close()
retval = CloseHandle(mhPort)
Catch ex As Exception
End Try
End Sub
--
Regards,
Jamie
[quoted text, click to view] "Gerry Hickman" wrote:
> Hi,
>
> It's just telling you to use a more up-to-date form of the FileOpen
> call. If it's just a case of sending simple character mode output to a
> device that presents itself as a writable file (such as LPT1) you could
> probably do this with script and sequential file I/O and save a lot of
> trouble.
>
> thejamie wrote:
> > I have a VS2005 dot net error message =>
> >
> > "This constructor has been deprecated. Please use Filestream(Safehandle
> > handle, FileAccess access) instead and optionally make a new safefile heandle
> > with ownsHandle=File if needed."
> >
> > This is in reference to an VB6 upgrade for the following code:
> >
> > FileOpen(1, mstrZebraPrinterPath, OpenMode.Output) PrintLine(1,
> > mstrLabelInfo)
> > FileClose(1)
> >
> > Error provides the following link:
> > http:/go.microsoft.com/fwlink/?linkid=14202
> >
> > Help, if you know anything about deprecated code or know of a way to print
> > to a zebra label printer.
>
>
> --
> Gerry Hickman (London UK)