Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: VB.NET Terminal
We are re-writing a VB.NET application that uses the System.Diagnositcs.Process.Start(mypdf)call to open a PDF document. A message box is displayed and when the user clicks OK, the PDf is typically closed using the CloseMainWindow() call. (we also check for the HasExited status)
 
command to create and display the PDF
myPDFDocument = System.Diagnostics.Process.Start(mypdf)  <--WORKS
 
user clicks ok that they want the PDF closed, the following command is called
MyPDFDocument.CloseMainWindow() <--Nothing happens
MyPDFDocument.Close()<--Nothing happens
 ---- then we do some other flag setting and go on our merry way
 
This code works fine in debug and when installed locally. The issue comes up when we deploy the code to a vWorkspace installation. The Msgbox windows and options are presented but the open PDF does not close.
 
I am not able to debug in a hosted environment so I am flying blind. From what I have read to date, it does not look like this function is supported. I did look into the Terminal services commands but those appear to be to terminate the session which I do not want to do.
 
Before I re-engineer everything, I am wondering if anyone has had the same issue and I am missing the obvious.
 

thank you-
Posted 11-Jan-13 9:52am
Edited 11-Jan-13 10:01am
(no name)252.3K
v2
Comments
Marcus Kramer at 11-Jan-13 15:53pm
   
I don't want to insinuate that you haven't thought of this, but why can't the user just close the pdf viewer from the pdf viewer window itself? Or am I missing something fundamental here to your process?
Zoltán Zörgő at 11-Jan-13 17:16pm
   
Added by OP as answer:
 
Thanks for your reply. That would be my preference as well. We have business and training requirements that dictate we ensure the document is closed prior to continuing through the rest of the process. There are some valid reasons for this, but also a bit of "this is how it was always done" thrown into the mix. If I propose a change in process, I need to be sure there isn't a simple technical solution which I am over-looking. Since posting, I am started looking at saving the file name and then check to see if it is open if they try to proceed. I was just hoping I was missing a parameter or something that would make the existing logic work in vWorkspace.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 OriginalGriff 445
1 Sergey Alexandrovich Kryukov 322
2 Maciej Los 275
3 CHill60 195
4 King Fisher 179
0 OriginalGriff 240
1 Maciej Los 95
2 Sascha Lefévre 85
3 King Fisher 70
4 F-ES Sitecore 55


Advertise | Privacy | Mobile
Web02 | 2.8.150327.1 | Last Updated 11 Jan 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100