Solved

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

Posted on 2004-09-09
6
720 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
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Limiting string to two deciamls 18 50
Form design in vb.net 7 34
VB.Net - For Loop Error 5 37
fso.FolderExists("\\server\HiddenFolder$") 4 51
Article by: Kraeven
Introduction Remote Share is a simple remote sharing tool, enabling you to see, add and remove remote or local shares. The application is written in VB.NET targeting the .NET framework 2.0. The source code and the compiled programs have been in…
A while ago, I was working on a Windows Forms application and I needed a special label control with reflection (glass) effect to show some titles in a stylish way. I've always enjoyed working with graphics, but it's never too clever to re-invent …
This is used to tweak the memory usage for your computer, it is used for servers more so than workstations but just be careful editing registry settings as it may cause irreversible results. I hold no responsibility for anything you do to the regist…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, just open a new email message. In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

910 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now