473,469 Members | 1,688 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Is this possible with "Process"?

I am using a "Process" to open a .pdf file in Acrobat Reader, like
this:

Dim proc As New Process
With proc.StartInfo
.FileName = "c:\filename.pdf"
.UseShellExecute = True
End With
proc.Start()

When the PDF file is open for viewing, I will eventually need Acrobat
to CLOSE the file, so i can programatically "move" the .pdf file to a
different location on my drive. But I can't because the file is in
use. Currently I have to manually close the .pdf file before moving
it.

Is there a way to have .net automatically close the file in Acrobat?

Thanks for all your help!

John

Nov 21 '05 #1
4 900
Hi John ! :O)
Is there a way to have .net automatically close the file in Acrobat?


using proc.CloseMainWindow() should close Acrobat (or any designated PDF
viewer) which should release the file ...

The question is, do you need the application to stay open ?

--
Best Regards
Yanick
Nov 21 '05 #2
Yanick,

Yes, ideally, I would like the app to stay open. So when the user
opens the next PDF file the entire Acrobat doesn't have to reload.

Is that possible? If not, for now I could deal with having the app
close. Not ideal, but maybe better than having to close the file
manually every time...

Thanks!
John

Nov 21 '05 #3

"johnb41" <or****@informatik.com> wrote in message
news:11**********************@g44g2000cwa.googlegr oups.com...
Yanick,

Yes, ideally, I would like the app to stay open. So when the user
opens the next PDF file the entire Acrobat doesn't have to reload.

Is that possible? If not, for now I could deal with having the app
close. Not ideal, but maybe better than having to close the file
manually every time...

Thanks!
John


Before creating the process, copy the file to the user's temporary folder
and open the temporary copy instead. That way, you can move the file around
and access it all you want :)

Mythran

Nov 21 '05 #4
Mythran,

Great idea, thanks! This will definitely work.

John

Nov 21 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Henne | last post by:
Hello, in VB6 we werr able to make ActiveX-DLL's (In Process Components) and ActiveX-Exe (Out Of Process Components). Out Application is build of one main application that starts other...
3
by: john | last post by:
I don't want to know what the CPU utilization is right now. I want to get the average utilization over the last, for example, hour. So I came up with a method where I would get a Process object...
4
by: Earth Worm Jim | last post by:
I am using VS.Net 2003 on Windows 2003 Server (standard edition) and I am getting "The process cannot access the file because it is being used by another process" on DLL's in a VS.Net solution. ...
1
by: Michael Tkachev | last post by:
Hi Everybody, I created an Excel file in the ASP.Net. When I wrote this file on the disk I tryed to release COM objects. But I couldn't do it. When my method finished an "Excel" process exists...
4
by: Gary Smith | last post by:
I have written VB6.0 application. Sometime it quites abnormally. Is it possible to monitor this "EXE" so that if it quits, I will be the first person to get notified!!! Is it possible to develop...
3
by: Bob | last post by:
I've been repeatedly annoyed by situations where a process has failed or otherwise something has gone wrong (not from any of my own apps) where I cannot move, rename, or delete a file because...
8
by: Henrik | last post by:
Hi Is there any way to see what the System process is doing? We have developed an application running at a production site to measure and optimize the production. The application needs to be...
4
by: hagaihe | last post by:
Hello, I've written a Windows service and i need help to implement the meaning of the sentence which is generated automatically by the IDE // More than one user Service may run within the same...
5
by: Matt | last post by:
Ok so I'm trying to run a simple dos command shell through a VB.NET 2005 program. The oddest thing is happening given the following piece of code: ...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.