Solved

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

Posted on 2004-09-09
6
741 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
[X]
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
  • 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
Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

 
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

[Webinar] Code, Load, and Grow

Managing multiple websites, servers, applications, and security on a daily basis? Join us for a webinar on May 25th to learn how to simplify administration and management of virtual hosts for IT admins, create a secure environment, and deploy code more effectively and frequently.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Excel Web Add-in Where is Visual Basic used 9 85
FTP recursive download files 5 28
vb.net dbnull syntax 1 59
Background worker passing messagebox yes no 13 26
This article explains how to create and use a custom WaterMark textbox class.  The custom WaterMark textbox class allows you to set the WaterMark Background Color and WaterMark text at design time.   IMAGE OF WATERMARKS STEPS Create VB …
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…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

752 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