Hi
i am trying to open a pdf file using vb.net with the following code. it gives an error messages at ar.src=splitout(i) and the message is "Attempted to read or write protected memory. This is often an indication that other memory is corrupt.". please help.
Thanks
Dim dlg As OpenFileDialog = New OpenFileDialog()
dlg.ShowDialog()
If dlg.ShowDialog = Windows.Forms.DialogResult.OK Then
Dim filestream As StreamReader = New StreamReader(dlg.OpenFile, System.Text.Encoding.Default)
Dim readcontents As String
readcontents = filestream.ReadToEnd()
Dim textdelimiter As String
textdelimiter = (" ")
Dim splitout() As String = Split(readcontents, textdelimiter)
Dim i As Integer
For i = 0 To UBound(splitout)
AR.src = splitout(i)
AR.Refresh()
System.Threading.Thread.Sleep(500)
Next
filestream.Close()
End If