|
Not my fault ! Must be cp forum bug.
|
|
|
|
|
Was just a joke!
Maybe it has something todo, with the prevention of hacks, which chris maunder had to implement.
|
|
|
|
|
I think you need KeyDown or KeyUp.
add the event handler where you can do:
if(e.KeyCode == KeyCode.Enter){<br />
}
it should be something like this...
Hope this helps.
V.
If I don't see you in this world, I'll see you in the next one... And don't be late. (Jimi Hendrix)
|
|
|
|
|
Thanks I think it'll work, I wanted to do same thing but didn't know exact syntax...
|
|
|
|
|
Index 4 does not exist. The last line should read like:
string str = string.Format("{0:000}:{1:00}:{2:00}:{3:00}", d, h, m, s);
I.e. replace 3 by 2 and 4 by 3.
|
|
|
|
|
You were quite fast thank you I have solved problem in mean time
|
|
|
|
|
Hello friends;
i develop a .net ce 5.0 project and i need to set regional settings, how can i do it? Thanks for your helps
Best Regards
|
|
|
|
|
hi guys!
need some help.
i need to access files from my local network through an Asp.net Application on win2k3 IIS 6.
i tried to open the file through filestream but it gives an Access Denied error .
i tried this:
string ActualPath = "\\\\192.168.0.26\\c$\program files\abc\abc.exe"<br />
FileStream file = new FileStream(ActualPath, FileMode.Open, FileAccess.Read);
but it thows an unauthroized access exception..
but when i try to run this code on XP with iis 5 . it works fine .
cant figure it out wtz the problem.
abhinav
|
|
|
|
|
The cause is that IIS 6 is more secure (relatively) and won't allow access like this. You could play around with impersonation however in the end it is not a good idea to allow access to files or application through a webpage. There has been a great deal of effort to lock down and protect systems from hacks, viruses and miscredents.
only two letters away from being an asset
|
|
|
|
|
Hi
Regarding Treeviwe control in C# , I want to add child nodes to treenode(which is also a child node) after user clicks on + , that is after user expand that node.
now how to display a plus sign to that child node whose children will be added after expanding that node ?
in VB i used to add fake child so it was displaying a + sign and after expanding on it i used to add children, same should be happen here so please help me in doing that.
-sandeep
|
|
|
|
|
sandeepvilasjoshi wrote:
in VB i used to add fake child so it was displaying a + sign and after expanding on it i used to add children, same should be happen here so please help me in doing that.
I've seen some C# projects as well where this technique of a "fake child" was used. I don't think there's a better way to do it.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
Your trick is somewhat user unfriendly. One of our chaps would call it "user hostile" . Users are familiar with that small plus sign as an indication of the existence of more child nodes under this current node. They click on it to expand the node, not to add other nodes.
You should put the adding functionality in another button/ToolStripButton/ToolStripMenuButton/etc... somewhere near the TreeView or even in the TreeView's context menu. Yet if you insist on doing your trick, for sure it's doable in C#. You can Add you fake node by code
MyTreeView.Nodes["MyNodeName"].Nodes.Add("Fake Node");
MyTreeView.Nodes["MyNodeName"].Collapse()
Then in the TreeView itself handle the event TreeView.BeforeExpand . Check for the expanding node. If it's the one you want remove the fake node and add whatever you like.
-- modified at 6:55 Wednesday 3rd January, 2007
Of course you can put your plus sign in an image, put that image in an ImageList, and associate it with the TreeView. This is another way of displaying the plus sign, but I'm not sure if the user clicked on the image -not the node itself- what event would fire. You can check it out easily , can't you?
Regards
|
|
|
|
|
hi
This will display one child node names "fake node" , so after expanding it first i have to remove that first fake node it and then fill the actual child nodes. i am trying how to remove that node first but so far not able to do so.
In my application there are thousands of child nodes that i received from another machine. i do not want to store that data in memory so i will fetch that data only if user asks for it by expanding the node.
|
|
|
|
|
sandeepvilasjoshi wrote: so after expanding it first i have to remove that first fake node
Not so. The BeforeExpand event happens before the parent node is expanded at all. So in the handler you remove your fake node bfore the parent node would ever expand. Thus no user will ever see your fake node. Removing it would be easy by one line in the handler.
e.Node.Nodes[0].Remove();
Also I made two more suggestions in my previous post that would give an alternate way of doing it.
sandeepvilasjoshi wrote: i do not want to store that data in memory
Each tree node won't take more than few bytes long in memory. Most modern computers got memory of 256Mb or more. So if you want to go through all these trouble just to save 200-300 Kbs of memory -which is very trivial- you are absolutely wrong. The above method will make a major performance hit in your program -try it-. Unless you got a million or more nodes I wouldn't recommend your idea. After all it's still your choice. Try this, and that and profile -some sort of speed test- your application, then decide where to go.
Regards
|
|
|
|
|
Nader Elshehabi wrote: "user hostile"
I agree, in fact if you need to allow the user to add items the TreeView may not be the control to use. If you insist, then I suggest a context menu, with Add, Remove, Edit, etc.
Some times the envelope pushes back.
|
|
|
|
|
Could somebody give me a sample code of chart control?
|
|
|
|
|
|
Over 40 people already published one on CodeProject
Luc Pattyn
|
|
|
|
|
hi, i have a windows application. in load event of my form i retrieve data from " Microsoft Access" database.
when i build or run form,i see several Error MessageBox with this content : "object reference not set to an instance of an object ".
after that i submit these , Program Runs Successfully!!
what is my problem?
thanks
|
|
|
|
|
You somewhere access a variable that is set to null .
The debugger will show you which variable this is, just run the Debug build.
regards
modified 12-Sep-18 21:01pm.
|
|
|
|
|
|
How to get the file path on mouse right click in c#?
Thanks & Regards,
Venkat
|
|
|
|
|
Please search on msdn first .....
then search on google .....
followed by looking in the previous posts ......
If you still do not get answers, post a message here ...
Regards,
Bhupi Bhai.
|
|
|
|
|
I had posted this message only after searching in google and msdn..
I have a windows based application in c#. On Windows explorer context menu i added one context menu item named "MyContext" . when the user right clicks on a file or folder, i have "MyContext" menu(This is the context menu item that i have added to the windows explorer context menu). When i click "MyContext" menu, i have to execute one application. In that application page load, i want to get the file or folder path that the user right clicked.
How to get that file path?? Please help
-- modified at 5:19 Wednesday 3rd January, 2007
Thanks & Regards,
Venkat
|
|
|
|
|
What you are talking about is called Windows Shell programming -not context menu -. In CodeProject there is a very good section about Shell programming. i think you can find the anwer there. Click here[^].
Regards
|
|
|
|