|
I am displaying the following properties inside the propertyGrid Control. What I want to do is that if i click inside the ID filed then display a Messagebox. If i click inside the Name field i want to display another Messagebox.
What I have done
GridItem itm = propertyGrid1.SelectedGridItem;
how can i get the control inside the Griditem. So I can add a click event to the label or textbox
Properties
ID
Name
Department
Age
|
|
|
|
|
I have an application that is connected to some external sources (text and image files). I refer to these sources through their full path. The sources are located in the same folder as the application (the executable).
Whenever I move the folder which contains the application and the sources to another directory, the sources are (for natural reasons) unreachable if I don't change the path in the source code.
I would like to know if there is a way to point directly to the containing folder of the application and the sources so I (or someone else) can run the application correctly from whatever directory without having to change the path in the source code or moving the folder to a specific directory.
Any suggestions are appreciated.
|
|
|
|
|
You can either use:
- Application.StartupPath
- use single dot syntax (current directory) like ".\subfolder\interestingfile.xyz"
Hope this helps,
Mika
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Thank you so much! Really helpful
|
|
|
|
|
No problem.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
|
Just a hint. Have a look at the conversation two threads earlier.
The need to optimize rises from a bad design.
My articles[ ^]
|
|
|
|
|
Member 3739527 wrote: urgent code needed
too many jokes this day
dhaim
programming is a hobby that make some money as side effect
|
|
|
|
|
I am trying to build a simple windows app that copies files from a network location to my local hard drive. I have tried to use
1 - network path
File.Copy(@"\\Mycomp\C$\PROJECTS\Test.txt", @"F:\Test.txt");
2 - a mapped drive to \\Mycomp\C$\
File.Copy(@"Z:\PROJECTS\Test.txt", @"F:\Test.txt");
I always get an IOException
"Logon failure: unknown user name or bad password".
My computer is on its own workgroup and runs vista, the computer I am trying to copy from has Windows XP and is on a domain. I have full access to that XP machine, I can navigate to \\Mycomp\C$\PROJECTS just fine using windows explorer...
Any help will be greatly appreciated !!!
Thanks.
Cedric D.
|
|
|
|
|
Chances are the issue has to do with the administrator account. As far as I understand, VS runs as administrator under most Vista installations. This means that your application will run under administrator when it's run in debug mode. The local administrator has all the authority it needs on the local authority, but is completely unrecognized on the remote machine. Ensure you're running the application under the correct account.
|
|
|
|
|
Thanks for the quick response.
I understand that is probably the root of my problem but how do I "Ensure you're running the application under the correct account" ?
Cedric D.
|
|
|
|
|
hey did you ever get a resolution for this, i am having the same exact problem how or where do i provide the username password within the file.copy statement, im so confused...
I can do all things through Christ which strengthens me!
|
|
|
|
|
|
What a rude demand by you. People do not give away code on this site. You might want to look at rentacoder if you are too incompetent to write code yourself.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Hello. Thank u for ur time to reply. as i said i am professional entrepreneur. Not a coder. So i need someone to give me some hints/code preferably optimized. i think people here are much talented
|
|
|
|
|
Meer Osman Ali wrote: So i need someone to give me some hints/code preferably optimized.
This is the wrong place to ask. People do not just hand over their hard work.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
There's no way anyone is going to just give you the code. Period, end of story. What makes you think that someone is going to give you his/her code so you, and you alone, can make money off of their hard work??
So, you accepted a project proposal that you have no competancy in?? Makes me wonder what kind of business you're really into...
|
|
|
|
|
Thanks a lot for ur time. That's what. An entrepreneur is one who can optimally utilize resources and cut down costs. Rather then get some expensive work off rentacoder, talented guys like you can make a lot of difference to the world. An entrepreneur is ur key. If you like, then help me out
|
|
|
|
|
Meer Osman Ali wrote: Rather then get some expensive work off rentacoder
I hope you are joking. Most rentacoder jobs are done for very cheap.
Meer Osman Ali wrote: An entrepreneur is one who can optimally utilize resources and cut down costs.
So, you are pretty much a leech since you want to suck off other people's hard work for next to nothing.
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Paul Conrad wrote: So, you are pretty much a leech since you want to suck off other people's hard work for next to nothing.
There there... don't get so angry on me. Thanks anyway...!
|
|
|
|
|
Meer Osman Ali wrote: don't get so angry on me.
Well, what is in it for us? As far as I can see Paul is correct. You want us to put in the hard work and you get the reward.
|
|
|
|
|
Colin Angus Mackay wrote:
Well, what is in it for us?
Being in the applications credits, like who would ever read something like that
"The clue train passed his station without stopping." - John Simmons / outlaw programmer
"Real programmers just throw a bunch of 1s and 0s at the computer to see what sticks" - Pete O'Hanlon
"Not only do you continue to babble nonsense, you can't even correctly remember the nonsense you babbled just minutes ago." - Rob Graham
|
|
|
|
|
Colin Angus Mackay wrote: Well, what is in it for us? As far as I can see Paul is correct. You want us to put in the hard work and you get the reward.
Oh yeah baby... i'll really give a nice pat on ur back
|
|
|
|
|
Meer Osman Ali wrote: Oh yeah baby... i'll really give a nice pat on ur back
Now you are just being patronising.
|
|
|
|
|
Of course he is. Do you really expect anyone to take you seriously?
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|