Click here to Skip to main content
15,913,027 members
Home / Discussions / C#
   

C#

 
AnswerRe: He only had a toothache? Um... Dog.Euthanize.Undo()... Pin
Leslie Sanford28-Mar-07 8:14
Leslie Sanford28-Mar-07 8:14 
GeneralRe: He only had a toothache? Um... Dog.Euthanize.Undo()... Pin
Edmundisme28-Mar-07 8:26
Edmundisme28-Mar-07 8:26 
QuestionGNU license question (version 2) Pin
kamPooh28-Mar-07 6:14
kamPooh28-Mar-07 6:14 
AnswerRe: GNU license question (version 2) Pin
Stanciu Vlad28-Mar-07 8:20
Stanciu Vlad28-Mar-07 8:20 
GeneralRe: GNU license question (version 2) Pin
Wayne Phipps28-Mar-07 9:25
Wayne Phipps28-Mar-07 9:25 
GeneralRe: GNU license question (version 2) Pin
kamPooh28-Mar-07 15:34
kamPooh28-Mar-07 15:34 
GeneralRe: GNU license question (version 2) Pin
Nathan Addy28-Mar-07 15:52
Nathan Addy28-Mar-07 15:52 
QuestionHow to delete PDF files after viewing Pin
AndrusM28-Mar-07 5:50
AndrusM28-Mar-07 5:50 
I'm trying to use the the following code to show pdf or xls file generated by ReportViewer.
After application closes, temporary files remain in disk.

How to delete PDF files after Adobe Reader is closed ?
Is the best way to save pdf files to temporary directory and delete whole directory if application exits or use filewatcher?
Any sample how to implement this ?

void ShowPDF( byte[] bytes ) {
static int i=0;
string outputfile = "temp"+(i++).ToString()+".pdf";
FileStream fs = new FileStream(outputFile, FileMode.Create);
fs.Write(bytes, 0, bytes.Length);
fs.Close();
System.Diagnostics.Process p = new System.Diagnostics.Process();
p = new System.Diagnostics.Process();

p.StartInfo.FileName = outputFile;
p.Start();
}



Andrus

QuestionAdapting form size to content size Pin
sinosoidal28-Mar-07 5:45
sinosoidal28-Mar-07 5:45 
AnswerRe: Adapting form size to content size Pin
Obaid ur Rehman28-Mar-07 7:43
Obaid ur Rehman28-Mar-07 7:43 
AnswerRe: Adapting form size to content size Pin
Arjun "Mjolnir" Bahree28-Mar-07 10:20
Arjun "Mjolnir" Bahree28-Mar-07 10:20 
AnswerRe: Adapting form size to content size Pin
Arjun "Mjolnir" Bahree28-Mar-07 10:21
Arjun "Mjolnir" Bahree28-Mar-07 10:21 
GeneralRe: Adapting form size to content size Pin
sinosoidal28-Mar-07 23:25
sinosoidal28-Mar-07 23:25 
QuestionMaximized child MDI form Pin
sinosoidal28-Mar-07 5:39
sinosoidal28-Mar-07 5:39 
Questiondisplaying images from a xml file Pin
diducmy28-Mar-07 5:35
diducmy28-Mar-07 5:35 
AnswerRe: displaying images from a xml file Pin
Martin#28-Mar-07 5:56
Martin#28-Mar-07 5:56 
QuestionXmlSerializer and CDATA Pin
theJazzyBrain28-Mar-07 5:15
theJazzyBrain28-Mar-07 5:15 
QuestionConverting a string to currency format Pin
lee.hallows28-Mar-07 5:09
lee.hallows28-Mar-07 5:09 
AnswerRe: Converting a string to currency format Pin
joon vh.28-Mar-07 5:17
joon vh.28-Mar-07 5:17 
QuestionUsing reference parameters when calling an exposed function from a DLL Pin
Dewald28-Mar-07 5:09
Dewald28-Mar-07 5:09 
AnswerRe: Using reference parameters when calling an exposed function from a DLL Pin
m@u28-Mar-07 5:29
m@u28-Mar-07 5:29 
GeneralRe: Using reference parameters when calling an exposed function from a DLL Pin
Dewald28-Mar-07 23:39
Dewald28-Mar-07 23:39 
QuestionGuidance Automation Toolkit or CodeSmith? Pin
wojti28-Mar-07 5:03
wojti28-Mar-07 5:03 
Questioncalling function in parent form from child form Pin
Lordveralix28-Mar-07 4:13
Lordveralix28-Mar-07 4:13 
AnswerRe: calling function in parent form from child form Pin
Pete O'Hanlon28-Mar-07 4:22
mvePete O'Hanlon28-Mar-07 4:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.