Click here to Skip to main content
16,017,922 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# Directories whilst debugging in visual studio Pin
Colin Angus Mackay25-Jul-07 10:31
Colin Angus Mackay25-Jul-07 10:31 
AnswerRe: C# Directories whilst debugging in visual studio Pin
martin_hughes24-Jul-07 3:25
martin_hughes24-Jul-07 3:25 
GeneralRe: C# Directories whilst debugging in visual studio Pin
Colin Angus Mackay24-Jul-07 3:31
Colin Angus Mackay24-Jul-07 3:31 
GeneralRe: C# Directories whilst debugging in visual studio Pin
martin_hughes24-Jul-07 4:09
martin_hughes24-Jul-07 4:09 
GeneralRe: C# Directories whilst debugging in visual studio Pin
Brady Kelly24-Jul-07 5:30
Brady Kelly24-Jul-07 5:30 
GeneralRe: C# Directories whilst debugging in visual studio Pin
[d]eljay24-Jul-07 5:18
[d]eljay24-Jul-07 5:18 
GeneralRe: C# Directories whilst debugging in visual studio Pin
Brady Kelly24-Jul-07 5:24
Brady Kelly24-Jul-07 5:24 
AnswerRe: C# Directories whilst debugging in visual studio Pin
Luc Pattyn24-Jul-07 5:31
sitebuilderLuc Pattyn24-Jul-07 5:31 
Hi,

if your app needs a set of images (that for some reason cannot be embedded as resources),
then you must choose a folder carefully, then code accordingly.

Some examples:

C:\images
it is simple, but absolute paths may give problems; C: may not exist or not be accessible

folder where exe is
that's what you get automatically

one of the children of that folder
use a relative path such as "\images"; may be inside "C:\Program Files" and might be
write=protected !
BTW you can go upstream with \.. (but that in general is a bad idea; I do it while
developping to get to the project folder: \..\.. removes \bin\debug)

[userdatafolder]\theAppName\images
a much better choice; the system provides a location to put application data that is
user dependent; it typically refers to C:\Documents and Settings\theUserName\Application Data
you should append at least \theAppName and optionally some more grouping (say \images)

you get [userdatafolder] from Environment.SpeicalFolder.ApplicationData; so
I would suggest Environment.SpeicalFolder.ApplicationData+@"\theAppName\images"

Smile | :)


GeneralRe: C# Directories whilst debugging in visual studio Pin
[d]eljay24-Jul-07 5:51
[d]eljay24-Jul-07 5:51 
GeneralRe: C# Directories whilst debugging in visual studio Pin
Luc Pattyn24-Jul-07 6:11
sitebuilderLuc Pattyn24-Jul-07 6:11 
GeneralDynamic adding, editing & deleting data from a datagrid Pin
AmitVikramSingh24-Jul-07 2:41
AmitVikramSingh24-Jul-07 2:41 
Questiona detour around an "input-synchronous call" Pin
Gjsonke24-Jul-07 2:15
Gjsonke24-Jul-07 2:15 
QuestionSerialize a web serive into a c# class Pin
buzzby24-Jul-07 1:52
buzzby24-Jul-07 1:52 
AnswerRe: Serialize a web serive into a c# class Pin
BoneSoft24-Jul-07 3:52
BoneSoft24-Jul-07 3:52 
AnswerRe: Serialize a web serive into a c# class Pin
MidwestLimey24-Jul-07 4:13
professionalMidwestLimey24-Jul-07 4:13 
QuestionUsing SMTP for sending emails Pin
sandman8824-Jul-07 1:47
sandman8824-Jul-07 1:47 
AnswerRe: Using SMTP for sending emails Pin
originSH24-Jul-07 1:53
originSH24-Jul-07 1:53 
AnswerRe: Using SMTP for sending emails Pin
Luc Pattyn24-Jul-07 1:56
sitebuilderLuc Pattyn24-Jul-07 1:56 
GeneralRe: Using SMTP for sending emails Pin
sandman8824-Jul-07 2:14
sandman8824-Jul-07 2:14 
GeneralRe: Using SMTP for sending emails Pin
Luc Pattyn24-Jul-07 2:38
sitebuilderLuc Pattyn24-Jul-07 2:38 
AnswerRe: Using SMTP for sending emails Pin
Guffa24-Jul-07 1:59
Guffa24-Jul-07 1:59 
AnswerRe: Using SMTP for sending emails Pin
Vasudevan Deepak Kumar24-Jul-07 2:07
Vasudevan Deepak Kumar24-Jul-07 2:07 
GeneralRe: Using SMTP for sending emails Pin
sandman8824-Jul-07 2:41
sandman8824-Jul-07 2:41 
GeneralRe: Using SMTP for sending emails Pin
ekynox24-Jul-07 3:12
ekynox24-Jul-07 3:12 
QuestionCustom setup like project- Visual Studio SDK Pin
ceejeeb24-Jul-07 1:36
ceejeeb24-Jul-07 1:36 

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.