Click here to Skip to main content
15,922,630 members
Home / Discussions / C#
   

C#

 
AnswerRe: ole container in dotnet? Pin
James T. Johnson15-Sep-02 19:30
James T. Johnson15-Sep-02 19:30 
GeneralRe: ole container in dotnet? Pin
Anonymous15-Sep-02 21:36
Anonymous15-Sep-02 21:36 
GeneralRe: ole container in dotnet? Pin
Elf15-Sep-02 21:36
Elf15-Sep-02 21:36 
AnswerRe: ole container in dotnet? Pin
Stephane Rodriguez.16-Sep-02 2:46
Stephane Rodriguez.16-Sep-02 2:46 
GeneralOpening a file in Excel programatically Pin
leppie15-Sep-02 9:28
leppie15-Sep-02 9:28 
GeneralRe: Opening a file in Excel programatically Pin
Domenic Denicola15-Sep-02 12:09
Domenic Denicola15-Sep-02 12:09 
GeneralRe: Opening a file in Excel programatically Pin
leppie15-Sep-02 12:45
leppie15-Sep-02 12:45 
GeneralRe: Opening a file in Excel programatically Pin
Domenic Denicola15-Sep-02 13:50
Domenic Denicola15-Sep-02 13:50 
Oh, huh.

The way I got around this in my program (.xctd -> .xml) was creatign a temporary .xml file and launching that with Process.Start. Dunno how that'd work for you, though.

If you're interested, here's my code for this, inside of the form or wherever:

private ArrayList tempFiles;

private string GetTempFilename(string extension)
{
   string tempFilename = Path.GetTempFileName();
   File.Move(tempFilename, tempFilename += ("." + extension));
   this.tempFiles.Add(tempFilename);

   return tempFilename;
}

// Make sure this gets attached to the right event.
private void MainForm_Closed(object sender, EventArgs e)
{
   foreach(string tempFile in this.tempFiles)
   {
      File.Delete(tempFile);
   }
}

// In any method, call this.GetTempFileName("tab").  It will return a 
// temporary .tab file, which will be cleaned up on the program's close.


It's not perfect, because the filename is temporary and therefore probably only suitable for restricted purposes.

Otherwise, if you know of any way to ensure that the temp files get cleaned up, I'd appreciate it. Right now, if the user doesn't close IE for my .xml files, they can't be deleted because they're in use.

-Domenic Denicola- [CPUA 0x1337]
MadHamster Creations

"I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

GeneralRe: Opening a file in Excel programatically Pin
Stephane Rodriguez.16-Sep-02 2:54
Stephane Rodriguez.16-Sep-02 2:54 
GeneralRe: Opening a file in Excel programatically Pin
leppie16-Sep-02 5:19
leppie16-Sep-02 5:19 
GeneralCustom event in a Control Pin
Mazdak15-Sep-02 6:50
Mazdak15-Sep-02 6:50 
GeneralRe: Custom event in a Control Pin
Nnamdi Onyeyiri15-Sep-02 7:00
Nnamdi Onyeyiri15-Sep-02 7:00 
GeneralRe: Custom event in a Control Pin
Mazdak15-Sep-02 8:43
Mazdak15-Sep-02 8:43 
GeneralPrivileges Pin
Nnamdi Onyeyiri15-Sep-02 3:14
Nnamdi Onyeyiri15-Sep-02 3:14 
GeneralRe: Privileges Pin
Mazdak15-Sep-02 5:14
Mazdak15-Sep-02 5:14 
GeneralRe: Privileges Pin
Nnamdi Onyeyiri15-Sep-02 6:46
Nnamdi Onyeyiri15-Sep-02 6:46 
GeneralRe: Privileges Pin
Mazdak15-Sep-02 6:55
Mazdak15-Sep-02 6:55 
Generalapp config for a C# web service Pin
User 988514-Sep-02 12:29
User 988514-Sep-02 12:29 
GeneralRe: app config for a C# web service Pin
James T. Johnson15-Sep-02 1:58
James T. Johnson15-Sep-02 1:58 
GeneralRe: app config for a C# web service Pin
User 988515-Sep-02 4:06
User 988515-Sep-02 4:06 
Questionhow can i renme a file in visual c#? Pin
waleed riaz14-Sep-02 11:16
waleed riaz14-Sep-02 11:16 
AnswerRe: how can i renme a file in visual c#? Pin
David Stone14-Sep-02 11:35
sitebuilderDavid Stone14-Sep-02 11:35 
GeneralVS.Net Add-in Pin
Tomas Petricek14-Sep-02 10:14
Tomas Petricek14-Sep-02 10:14 
GeneralRe: VS.Net Add-in Pin
Nnamdi Onyeyiri14-Sep-02 12:05
Nnamdi Onyeyiri14-Sep-02 12:05 
GeneralRe: VS.Net Add-in Pin
Tomas Petricek15-Sep-02 1:30
Tomas Petricek15-Sep-02 1:30 

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.