Click here to Skip to main content
16,004,927 members
Home / Discussions / C#
   

C#

 
GeneralRe: VISIO SDK OfficePlanSample Pin
Heath Stewart20-Apr-04 3:31
protectorHeath Stewart20-Apr-04 3:31 
GeneralRe: VISIO SDK OfficePlanSample Pin
Anonymous20-Apr-04 4:36
Anonymous20-Apr-04 4:36 
GeneralSet CurrentCell Focus Pin
DucLinh11-Apr-04 22:21
DucLinh11-Apr-04 22:21 
GeneralRe: Set CurrentCell Focus Pin
Mazdak11-Apr-04 22:36
Mazdak11-Apr-04 22:36 
GeneralCurrent Path in C# Pin
Saleh Alshadheli11-Apr-04 21:03
Saleh Alshadheli11-Apr-04 21:03 
GeneralRe: Current Path in C# Pin
Stefan Troschuetz11-Apr-04 21:29
Stefan Troschuetz11-Apr-04 21:29 
GeneralRe: Current Path in C# Pin
Tom Larsen12-Apr-04 5:06
Tom Larsen12-Apr-04 5:06 
GeneralRe: Current Path in C# Pin
Heath Stewart12-Apr-04 5:10
protectorHeath Stewart12-Apr-04 5:10 
While I'm sure you probably mean what the other reply suggested (Application.StartupPath), "current path" is not always the same directory as the application. It is the current working directory, and can be set on shortcuts to something different, or if you are in a command prompt in a different directory and type the path to the application. The directory you're in is the currenty working directory. It's important to be mindful of this fact.

To get the current working directory, you can get the Environment.CurrentDirectory. If you want the application directory to be the current working directory anytime your application starts, set this property like so:
Environment.CurrentDirectory = Application.StartupPath;


 

Microsoft MVP, Visual C#
My Articles
GeneralCustom attribute in Active Directory user account Pin
hd4478011-Apr-04 20:29
hd4478011-Apr-04 20:29 
GeneralRe: Custom attribute in Active Directory user account Pin
Mazdak11-Apr-04 20:58
Mazdak11-Apr-04 20:58 
GeneralRe: Custom attribute in Active Directory user account Pin
Heath Stewart12-Apr-04 5:32
protectorHeath Stewart12-Apr-04 5:32 
GeneralRe: Custom attribute in Active Directory user account Pin
hd4478012-Apr-04 7:07
hd4478012-Apr-04 7:07 
QuestionIs it possible to split a class into several files ? Pin
Andres Coder11-Apr-04 20:11
Andres Coder11-Apr-04 20:11 
AnswerRe: Is it possible to split a class into several files ? Pin
Colin Angus Mackay11-Apr-04 23:42
Colin Angus Mackay11-Apr-04 23:42 
GeneralMDI Client Area Color Pin
Riaan van der Westhuizen11-Apr-04 20:08
Riaan van der Westhuizen11-Apr-04 20:08 
GeneralRe: MDI Client Area Color Pin
STW11-Apr-04 22:45
STW11-Apr-04 22:45 
GeneralAudio & Video chat Pin
Member 33502211-Apr-04 19:27
Member 33502211-Apr-04 19:27 
GeneralRe: Audio & Video chat Pin
DucLinh11-Apr-04 23:53
DucLinh11-Apr-04 23:53 
GeneralRe: Audio & Video chat Pin
Anonymous30-May-04 17:05
Anonymous30-May-04 17:05 
GeneralEmbedding VC++.NET code in VC#.NET Project Pin
Nagendra Kamath K11-Apr-04 19:06
Nagendra Kamath K11-Apr-04 19:06 
GeneralRe: Embedding VC++.NET code in VC#.NET Project Pin
Jesse Squire12-Apr-04 2:13
Jesse Squire12-Apr-04 2:13 
GeneralImage trnasfer using Remoting Pin
Nagendra Kamath K11-Apr-04 19:03
Nagendra Kamath K11-Apr-04 19:03 
GeneralRe: Image trnasfer using Remoting Pin
Heath Stewart12-Apr-04 5:35
protectorHeath Stewart12-Apr-04 5:35 
Generaldatagrid cell updates Pin
DougW4811-Apr-04 19:01
DougW4811-Apr-04 19:01 
GeneralRe: datagrid cell updates Pin
Mazdak11-Apr-04 21:40
Mazdak11-Apr-04 21:40 

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.