Click here to Skip to main content
15,888,802 members
Home / Discussions / C#
   

C#

 
GeneralRe: adding attachments to an email Pin
Heath Stewart4-Feb-05 6:31
protectorHeath Stewart4-Feb-05 6:31 
QuestionHow to have MenuItems not show arrow when it has submenu Pin
VPMahank4-Feb-05 5:28
VPMahank4-Feb-05 5:28 
GeneralSocket and Multithreading Pin
sameerhanda4-Feb-05 5:05
sameerhanda4-Feb-05 5:05 
GeneralRe: Socket and Multithreading Pin
Heath Stewart4-Feb-05 6:24
protectorHeath Stewart4-Feb-05 6:24 
GeneralFilestream issue Pin
Esmo20004-Feb-05 4:43
Esmo20004-Feb-05 4:43 
GeneralRe: Filestream issue Pin
Esmo20004-Feb-05 4:46
Esmo20004-Feb-05 4:46 
GeneralRe: Filestream issue Pin
Anonymous4-Feb-05 4:57
Anonymous4-Feb-05 4:57 
GeneralRe: Filestream issue Pin
Heath Stewart4-Feb-05 6:20
protectorHeath Stewart4-Feb-05 6:20 
There's two things you must keep in mind - the application directory and the current working directory. When you start an application, the current working directory may not necessarily be the same as the application directory. Double clicking the EXE would yield this result, but a shortcut to your application may define a different working directory. A working directory can also be changed at runtime (i.e., while your application is running).

If you want that file to always be relative to your application, use the Application.StartupPath like so:
string filename = Path.Combine(Application.StartupPath, "file.dat");
Without specifying a full path starting from the drive path, the current working directory is used to resolve the file path.

This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralBeep() without using Windows.Forms Pin
Tim Gilbert4-Feb-05 4:32
Tim Gilbert4-Feb-05 4:32 
GeneralRe: Beep() without using Windows.Forms Pin
Anonymous4-Feb-05 4:39
Anonymous4-Feb-05 4:39 
GeneralRe: Beep() without using Windows.Forms Pin
Tim Gilbert4-Feb-05 4:48
Tim Gilbert4-Feb-05 4:48 
GeneralRe: Beep() without using Windows.Forms Pin
Dave Kreskowiak4-Feb-05 6:33
mveDave Kreskowiak4-Feb-05 6:33 
GeneralRe: Beep() without using Windows.Forms Pin
Nick Parker4-Feb-05 6:13
protectorNick Parker4-Feb-05 6:13 
GeneralRe: Beep() without using Windows.Forms Pin
Heath Stewart4-Feb-05 6:16
protectorHeath Stewart4-Feb-05 6:16 
GeneralRe: Beep() without using Windows.Forms Pin
Dave Kreskowiak4-Feb-05 6:35
mveDave Kreskowiak4-Feb-05 6:35 
GeneralLinkLabel size Pin
gantww4-Feb-05 3:39
gantww4-Feb-05 3:39 
GeneralRe: LinkLabel size Pin
Anonymous4-Feb-05 4:45
Anonymous4-Feb-05 4:45 
GeneralRe: LinkLabel size Pin
gantww4-Feb-05 7:54
gantww4-Feb-05 7:54 
GeneralImage Rectify or Panorama algorithm Pin
pxp4-Feb-05 3:15
pxp4-Feb-05 3:15 
GeneralRe: Image Rectify or Panorama algorithm Pin
pxp6-Feb-05 23:15
pxp6-Feb-05 23:15 
QuestionHow can I controle by resource in C# Pin
students552 university4-Feb-05 2:51
students552 university4-Feb-05 2:51 
AnswerRe: How can I controle by resource in C# Pin
Judah Gabriel Himango4-Feb-05 6:38
sponsorJudah Gabriel Himango4-Feb-05 6:38 
GeneralListView grouping Pin
dpmIris4-Feb-05 2:49
dpmIris4-Feb-05 2:49 
GeneralRe: ListView grouping Pin
Heath Stewart4-Feb-05 6:07
protectorHeath Stewart4-Feb-05 6:07 
GeneralRe: ListView grouping Pin
dpmIris6-Feb-05 22:01
dpmIris6-Feb-05 22:01 

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.