Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

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

Posted on 2004-09-09
6
730 Views
Last Modified: 2011-09-06
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
Comment
Question by:rrouse
  • 3
  • 2
6 Comments
 
LVL 4

Expert Comment

by:Javert93
ID: 12022086
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
 
LVL 18

Accepted Solution

by:
DotNetLover_Baan earned 250 total points
ID: 12022459
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
 
LVL 4

Expert Comment

by:Javert93
ID: 12022478
That will only launch the application for you, and it will launch a new instance each time you execute it.
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

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.

 
LVL 8

Expert Comment

by:wguerram
ID: 12026374
I tried DotNetLover_Baan solution and doesn't open a new instance of the application.

all files are opened in the existing instance.
0
 
LVL 4

Expert Comment

by:Javert93
ID: 12028815
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
 
LVL 8

Expert Comment

by:wguerram
ID: 12029518
notepad is not an MDI applictation.
0

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.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This tutorial demonstrates one way to create an application that runs without any Forms but still has a GUI presence via an Icon in the System Tray. The magic lies in Inheriting from the ApplicationContext Class and passing that to Application.Ru…
1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
In an interesting question (https://www.experts-exchange.com/questions/29008360/) here at Experts Exchange, a member asked how to split a single image into multiple images. The primary usage for this is to place many photographs on a flatbed scanner…

766 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question