View Single Post
  #8 (permalink)  
Old 07-14-2009, 2:20 AM
selvamarcadu selvamarcadu is offline
VB.NET Forum Newbie
.NET Framework: .NET 3.5 (VS 2008)
 
Join Date: Jul 2009
Age: 22
Posts: 17
Reputation: 11
selvamarcadu is on a distinguished programming path ahead
Default pdf rendering and text search

Hi thanks JohnH,

I tried it,but "System.Windows.Forms.AxHost+InvalidActiveXStateEx ception" is thrown

My code looks as,

Dim resources As System.Resources.ResourceManager = New System.Resources.ResourceManager(GetType(frmMain))
Dim pdf As New AxAcroPDFLib.AxAcroPDF
pdf.OcxState = CType(resources.GetObject("AxAcroPDF1.OcxState"), System.Windows.Forms.AxHost.State)
pdf.LoadFile("path_to_pdf")
ChildForm.Controls.Add(pdf)
ChildForm.Show(DockPanel)


When i place the Adobe Reader control in frmMain ,i could access it.But,when i create a new one it throws such exception.
Reply With Quote