Inconsistent behaviour axAcroPDF
I have a pdf viewer in a C# windows project which for the sake of the example, displays selected filename from a listbox. It is a simple form with a listbox an axAcroPDF and textbox to confirm correct filepath. The code is as follows and the files have been placed in a folder pdfs in the Debug folder:
It all works correctly with a few issues:- the first time you cycle through the files it displays correctly in the window but if you go back to an entry, the second time it shows the toolbar at the right despite this being disabled in the code. The toolbar takes up the bulk of the window.
- When you close the window, it takes and inordinately long time to close, indicating to me there is a lot of housekeeping going on. Any clues on why this would be happening.
In addition to this:
- do I need both .LoadFile and .src statements in the code as both work in isolation but is one preferable to the other. Doesn't seem to change the above issues. This method was lifted from another Stack Overflow question.
I have included the whole project in the following link:
https://1drv.ms/f/s!AkD2ubJzIfJZliflFFu5EwAqNrc3
Thanks
PS Since originally posting, I have tried to display in a webBrowser window but exactly the same thing happens with the toolbar panel displaying the second time you select an entry. The code is as follows:
webBrowser1.Url = new Uri(path);