The last part can be written much easier in VB:
Private Sub msGPDF_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles msGPDF.Click
Dim Stream As IO.Stream = objRpt.ExportToStream(ExportFormatType.PortableDocFormat)
Dim Buffer(CInt(Stream.Length)) As Byte
Stream.Read(Buffer, 0, CInt(Stream.Length))
My.Computer.FileSystem.WriteAllBytes("Report.pdf", Buffer, False)
System.Diagnostics.Process.Start(fs.Name)
End Sub
Theo worked as a VB architect and software engineer since 1994, started with VB3, en is working with VB ever since to build mission critical enterprise applications for a wide range of customers.