Solved

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

Posted on 2004-09-09
6
726 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
Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

 
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

Efficient way to get backups off site to Azure

This user guide provides instructions on how to deploy and configure both a StoneFly Scale Out NAS Enterprise Cloud Drive virtual machine and Veeam Cloud Connect in the Microsoft Azure Cloud.

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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
In a recent question (https://www.experts-exchange.com/questions/28997919/Pagination-in-Adobe-Acrobat.html) here at Experts Exchange, a member asked how to add page numbers to a PDF file using Adobe Acrobat XI Pro. This short video Micro Tutorial sh…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.

809 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