FamousMortimer
asked on
VB.NET 'Object reference not set to an instance of an object' Loading PDF in Adobe PDF Reader Component
Hi Experts,
I am tring to create a form with a PDF viewer in a WPF application. I am using QuickWPFMonthCalendar that i downloaded here: http://www.codeproject.com/Articles/34052/Quick-and-Simple-WPF-Month-view-Calendar
I created a form and added an AxAcroPDF Control but i receive Object reference not set to an instance of an object error. Here is the code on Day double click, that is supposed to load a test pdf.
I am tring to create a form with a PDF viewer in a WPF application. I am using QuickWPFMonthCalendar that i downloaded here: http://www.codeproject.com/Articles/34052/Quick-and-Simple-WPF-Month-view-Calendar
I created a form and added an AxAcroPDF Control but i receive Object reference not set to an instance of an object error. Here is the code on Day double click, that is supposed to load a test pdf.
Private Sub DayBoxDoubleClicked_event(ByVal e As NewAppointmentEventArgs) Handles AptCalendar.DayBoxDoubleClicked
MessageBox.Show("You double-clicked on day " & CDate(e.StartDate).ToShortDateString(), "Calendar Event", MessageBoxButton.OK)
Dim frmProject As New frmProjectDetails
frmProject.AxAcroPDF1.LoadFile("D:\Temp\test.pdf")
frmProject.Show()
End Sub
Which line throws the error?
ASKER
Line 4.
I even tried putting this code in the form load event and it give the same error.
I even tried putting this code in the form load event and it give the same error.
Well it should work
http://hugeonion.com/2009/04/06/displaying-a-pdf-file-within-a-wpf-application/
Otherwise, try creating the control dynamically
http://stackoverflow.com/questions/55083/opening-a-pdf-in-wpf-application
http://hugeonion.com/2009/04/06/displaying-a-pdf-file-within-a-wpf-application/
Otherwise, try creating the control dynamically
http://stackoverflow.com/questions/55083/opening-a-pdf-in-wpf-application
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
--