• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 786
  • Last Modified:

Opening/Closing .pdf files from a VB.Net console app while keeping Acrobat window open.

I realize that my question my not seem very difficult to many of you, but this is my first .Net app.  Anyway, I would like to open (via the dbl-click event of a filename) a .pdf file from a VB.Net windows console application in a new window which would run Acrobat.  The first file opened would have to start the Acrobat application.  Then, I would like to be able to open and close files within Acrobat from the .Net application without having to actually close the Acrobat window.  If I can get this to work, I intend to close the Acrobat window when the form itself is closed.  

Any suggestions would be greatly appreciated!  Thanks!
0
rrouse
Asked:
rrouse
  • 3
  • 2
1 Solution
 
Javert93Commented:
As far as I know, the only way to do what you are asking requires the use of an Automation model (similar to what MS Office applications have), but I don't believe that Adobe exposes such and object model. However, I think you can send OLE commands to the Acrobat Reader application onced you have launched it with Process.Start().
0
 
DotNetLover_BaanCommented:
Hi there. use Process.
In the Double click event, write..

System.Diagnostics.Process.Start("Your file name")

See what MSDN says.. http://msdn.microsoft.com/library/en-us/cpref/html/frlrfSystemDiagnosticsProcessClassStartTopic.asp
-@Baan
0
 
Javert93Commented:
That will only launch the application for you, and it will launch a new instance each time you execute it.
0
Cloud Class® Course: CompTIA Cloud+

The CompTIA Cloud+ Basic training course will teach you about cloud concepts and models, data storage, networking, and network infrastructure.

 
wguerramCommented:
I tried DotNetLover_Baan solution and doesn't open a new instance of the application.

all files are opened in the existing instance.
0
 
Javert93Commented:
Well, as long as it works. Just be warned that Acrobat may be like Word (where all documents can open in the same instance), but not all applications are like that (notepad, for example).
0
 
wguerramCommented:
notepad is not an MDI applictation.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now