Click here to Skip to main content
15,894,955 members
Home / Discussions / C#
   

C#

 
AnswerRe: How can I make a newline in "net send" Pin
leppie27-Dec-03 0:39
leppie27-Dec-03 0:39 
GeneralRe: How can I make a newline in "net send" Pin
bookwormXP27-Dec-03 1:01
bookwormXP27-Dec-03 1:01 
GeneralRe: How can I make a newline in "net send" Pin
leppie27-Dec-03 1:20
leppie27-Dec-03 1:20 
GeneralRe: How can I make a newline in "net send" Pin
bookwormXP27-Dec-03 1:26
bookwormXP27-Dec-03 1:26 
GeneralRe: How can I make a newline in "net send" Pin
LongRange.Shooter30-Dec-03 9:35
LongRange.Shooter30-Dec-03 9:35 
AnswerRe: How can I make a newline in "net send" Pin
Heath Stewart27-Dec-03 5:19
protectorHeath Stewart27-Dec-03 5:19 
AnswerRe: How can I make a newline in "net send" Pin
Mazdak27-Dec-03 8:53
Mazdak27-Dec-03 8:53 
General"The file isn't specified" error for opening documents Pin
tchaka26-Dec-03 15:40
tchaka26-Dec-03 15:40 
I tried to create a method to open a document, but I got "The file isn't specified" error message. I debugged and saw the FileName contained like "C:\MyProject\Documents\my.doc", and it seems to be ok. Here is the code:

public void OpenDoc(string myDocumentsPath,
string fileName)
{
Process myProcess = new Process();

try
{
myProcess.StartInfo.FileName = myDocumentsPath + fileName;
myProcess.StartInfo.Verb = "Open";
myProcess.StartInfo.UseShellExecute = true;
myProcess.StartInfo.RedirectStandardOutput = false;
myProcess.Start();
}

catch (Win32Exception e)
{
if(e.NativeErrorCode == ERROR_FILE_NOT_FOUND)
{
Console.WriteLine(e.Message + ". Check the path.");
}
else if (e.NativeErrorCode == ERROR_ACCESS_DENIED)
{
Console.WriteLine(e.Message +
". You do not have permission to open this file.");
}
}


If you find something is wrong, please let me know.

Thank you for your help,



GeneralRe: "The file isn't specified" error for opening documents Pin
eggie526-Dec-03 18:04
eggie526-Dec-03 18:04 
GeneralRe: "The file isn't specified" error for opening documents Pin
tchaka26-Dec-03 20:22
tchaka26-Dec-03 20:22 
GeneralRe: "The file isn't specified" error for opening documents Pin
eggie527-Dec-03 6:51
eggie527-Dec-03 6:51 
GeneralRe: "The file isn't specified" error for opening documents Pin
Heath Stewart27-Dec-03 5:16
protectorHeath Stewart27-Dec-03 5:16 
GeneralRe: "The file isn't specified" error for opening documents Pin
tchaka27-Dec-03 12:53
tchaka27-Dec-03 12:53 
GeneralRe: "The file isn't specified" error for opening documents Pin
eggie51-Jan-04 6:40
eggie51-Jan-04 6:40 
GeneralManually setting MIME type in WebBrowser Pin
Alex Korchemniy26-Dec-03 13:06
Alex Korchemniy26-Dec-03 13:06 
GeneralLOL Pin
Alex Korchemniy26-Dec-03 15:08
Alex Korchemniy26-Dec-03 15:08 
GeneralRe: Manually setting MIME type in WebBrowser Pin
Heath Stewart27-Dec-03 5:14
protectorHeath Stewart27-Dec-03 5:14 
GeneralRe: Manually setting MIME type in WebBrowser Pin
Alex Korchemniy27-Dec-03 11:39
Alex Korchemniy27-Dec-03 11:39 
Generaldrop files into windows explorer Pin
elena1234526-Dec-03 7:49
elena1234526-Dec-03 7:49 
GeneralRe: drop files into windows explorer Pin
J. Dunlap26-Dec-03 8:58
J. Dunlap26-Dec-03 8:58 
GeneralRe: drop files into windows explorer Pin
elena1234526-Dec-03 11:22
elena1234526-Dec-03 11:22 
GeneralSimple PDF filling Pin
Alex Korchemniy26-Dec-03 7:22
Alex Korchemniy26-Dec-03 7:22 
GeneralWow this is awesome Pin
Alex Korchemniy26-Dec-03 8:46
Alex Korchemniy26-Dec-03 8:46 
GeneralRe: Wow this is awesome Pin
Kentamanos26-Dec-03 9:31
Kentamanos26-Dec-03 9:31 
GeneralRe: Wow this is awesome Pin
Alex Korchemniy26-Dec-03 12:22
Alex Korchemniy26-Dec-03 12: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.