Click here to Skip to main content
16,013,747 members
Home / Discussions / C#
   

C#

 
GeneralRe: DBase file access in C# Pin
IJay20-May-04 22:11
IJay20-May-04 22:11 
GeneralOpening any file Pin
Dylan van Heerden19-May-04 23:38
Dylan van Heerden19-May-04 23:38 
GeneralRe: Opening any file Pin
the last free name20-May-04 0:55
the last free name20-May-04 0:55 
GeneralRe: Opening any file Pin
Dylan van Heerden20-May-04 1:07
Dylan van Heerden20-May-04 1:07 
GeneralRe: Opening any file Pin
the last free name20-May-04 1:58
the last free name20-May-04 1:58 
GeneralRe: Opening any file Pin
sreejith ss nair20-May-04 2:06
sreejith ss nair20-May-04 2:06 
GeneralRe: Opening any file Pin
Dylan van Heerden20-May-04 5:18
Dylan van Heerden20-May-04 5:18 
GeneralRe: Opening any file Pin
Dave Kreskowiak20-May-04 5:56
mveDave Kreskowiak20-May-04 5:56 
_Hacker wrote:
MessageBox.Show(Files[0].ToString());
Process.Start(Files[0].ToString());


I bet the MessageBox didn't show the FULL path to the file you tried to open, did it?
The following code changes will work because the code will no longer assume a default directory with using just Files[]:
try
{
    String parentPath = Directory.GetParent("C:\\Club");
    String fullFilePath;
    DirectoryInfo dirInfo = New DirectoryInfo(parentPath);
 
    FileInfo[] Files = dirInfo.GetFiles("*.xml");
    fullFilePath = Path.Combine(parentPath, Files[0]);
    MessageBox.Show(fullFilePath);
    Process.Start(fullFilePath);
}
catch(Exception Error)
{
    MessageBox.Show(Error.Message);
}



RageInTheMachine9532
"...a pungent, gastly, stinky piece of cheese!" -- The Roaming Gnome

GeneralRe: Opening any file Pin
Dylan van Heerden20-May-04 19:16
Dylan van Heerden20-May-04 19:16 
GeneralMouse pointer got arrested Pin
mmxguy19-May-04 23:36
mmxguy19-May-04 23:36 
GeneralRe: Mouse pointer got arrested Pin
Heath Stewart20-May-04 2:46
protectorHeath Stewart20-May-04 2:46 
GeneralRe: Mouse pointer got arrested Pin
Dave Kreskowiak20-May-04 4:29
mveDave Kreskowiak20-May-04 4:29 
QuestionAny idea on where to find information on this? Pin
MeterMan19-May-04 21:07
MeterMan19-May-04 21:07 
AnswerRe: Any idea on where to find information on this? Pin
sreejith ss nair19-May-04 21:34
sreejith ss nair19-May-04 21:34 
AnswerRe: Any idea on where to find information on this? Pin
Heath Stewart20-May-04 2:42
protectorHeath Stewart20-May-04 2:42 
GeneralRe: Any idea on where to find information on this? Pin
Anonymous20-May-04 5:02
Anonymous20-May-04 5:02 
Questiondisplay a picturebox on a picturebox? Pin
theDawckta19-May-04 19:47
theDawckta19-May-04 19:47 
AnswerRe: display a picturebox on a picturebox? Pin
Meysam Mahfouzi19-May-04 20:33
Meysam Mahfouzi19-May-04 20:33 
GeneralRe: display a picturebox on a picturebox? Pin
theDawckta19-May-04 20:46
theDawckta19-May-04 20:46 
GeneralRe: display a picturebox on a picturebox? Pin
MeterMan19-May-04 23:08
MeterMan19-May-04 23:08 
AnswerRe: display a picturebox on a picturebox? Pin
Heath Stewart20-May-04 2:38
protectorHeath Stewart20-May-04 2:38 
QuestionHow to change cursor when mouse is moved over PrintPreviewControl Pin
sachinkalse19-May-04 19:45
sachinkalse19-May-04 19:45 
AnswerRe: How to change cursor when mouse is moved over PrintPreviewControl Pin
sreejith ss nair19-May-04 20:56
sreejith ss nair19-May-04 20:56 
GeneralRe: How to change cursor when mouse is moved over PrintPreviewControl Pin
sachinkalse19-May-04 21:37
sachinkalse19-May-04 21:37 
GeneralRe: How to change cursor when mouse is moved over PrintPreviewControl Pin
Dave Kreskowiak21-May-04 0:19
mveDave Kreskowiak21-May-04 0:19 

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.