Answer Questions
JH_ how to check the node's text, level and depth in a treeview control?
For example, if I have a parent node Root and then child node Child created at design-time, I know how to add child nodes to Child at run-time but my problem is adding grandchild nodes to Child. Root Child ChildOfChild1 // created at run-time ChildOfChild2 // created at run-time How can I add child nodes to ChildOfChild1 or to ChildOfChild2 at run-time the children of Child are sorted randomly so their indices change. ...Show All
Ang Bain Design question : Inheritance, Interface, Push, Pull ???
I have a form which is in a File Explorer style: The left side is the TreeView control and the right side is a display portion. The two portions are split by a slitter control. Every time the user clicks on a node on the TreeView, the node displays itself on the display portion of the form. For now, I only have 3 types of nodes, but as the application expands, so does the number of nodes and do their display requirements. NodeA: Display informat ...Show All
Ben Fry VS.Net 2005 hangs on a using command
Ok, here is the problem We’ve got the latest VS.NET software developer from MSDN (3 days ago), and in the past 3 days we were able to convert the entire project to .net 2.0, and getting it to compile and run. The performance of the IDE is not good, but that is another thing to complain about, I can live with the poor performance, but not with the crashes. I just realized that I cannot open any file that has the ...Show All
marca Need help with String.Format
Hi. I have this issue, where i need to format a string. Here's the problem causing code snippet: string formatString = "myString{{0},{1}}"; string arg1 = "value1"; string arg2 = "value2"; string result = String.Format(formatString, arg1, arg2); result should be "myString{value1,value2}", but i just get the FormatException. So you can see where the problem lies, the String.Format -method cannot ...Show All
Razter static destructor ?
So in an effort to try and improve my skills I'm going trough the spec. So around page ~33 I get bloody confused and install the express edition on my machine to spike some stuff out. The thing that confused me is the static constructor. I've learned the singlton pattern w/ a private contructor rather than the static constructor, so I have never really seen it before. But I was wondering how I would ever get rid of the structures that a ...Show All
ramuty Import xls file into dataset
Hi , I am solving this problem:I need import data in xls file into DataSet, but i dont know how.I think, it could be done like this: 1 .I save xls file like cvs or other txt file(with separators of data) and in C# i will use stream reader for get it into dataset. 2 .I save the xls file like xml file, and than i will read it into dataset.But how. 3 .I read into data set xls file. What is your opinion Are these options right Thanks for any a ...Show All
84B0CE60-A907-43B6-B31D-653F2FBE Threading problems
Hi there. This is wierd I have a code that works fine, when you abort the background thread it aborts it properly (causes the ThreadAbortException) however taking the same piece of code and modifying it slightly (not even touching the thread properties) doesnt seem to abort the thread at all! //Method 1 or something void SomeMethod() try { ... ... do stuff ... } catch (ThreadAbortException) { this.theRunningThread = null; } pr ...Show All
alideniz How to dynamic load ASP.NET User Controls in Visual Studio 2005
Did anybody know how to dynamic load ASP.NET User Controls in Visual Studio 2005 if I put the User Controls in the App_Controls subfolder Here is my test code: using System; using System.Data; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; public partial ...Show All
J. Dev Passing array into Constructor
Hey guys, I'm using C# 2.0 and thought I would take advantage of the new params keyword (I might not even need it if someone can show me another way). I'm making a custom class that handles files that our customers upload via the upload control. I want to only allow certain types of files to be uploaded, and was going to leave this up to the consumer of this object to specify in the contructor what file types they would like to allow from a p ...Show All
Joe Malesich Apps for Non-framework users
Hi. I'm been thinking of making a couple of small applikations using C# and dotnet mostly cause i want to and the language seems interesting But i have a question i'd like to have awnsered. The machines the apps ar going to be used on don't have the space for the framework but i can squeeze in one or two simple apps. So is there a way to make an application so that the needed dll files and whatNot are all gathered together and ready to ...Show All
John OC Custom dictionary keys identity
I implemented a reference class (MyKey) that I use as key of a dictionary (Generic.Dictionary<MyKey, MyValue>). The problem is that ContainsKey always returns false, except when I pass the very object that I used as key. I tried to override Object.Equals: no change I then tried to implement IComparable, then IEquatable<MyKey>: still no change What should MyKey implement for this to work Chris. ...Show All
iscbaltazar Global Variables
Hi, I need to use global variables, so I have made this class: public class globalvars { public static string first_name; public globalvars( string fname){ first_name = fname; } public static getval(){ return first_name; } } I have a few window forms in my project. If I declare an instance of the previous class (eg. globalvars g = new globalvars("hello")), the instance g is not kno ...Show All
Matt Finucane Built a C# console app on XP, gets entry point error on WIN NT4 SP6a
Hi, Using VS 2005 on WIN XP pro SP2, I built a C# console app that works on XP. It uses/opens a serial port to detect pin changes, opens a file, and uses the system timer and timer events. When I try to execute it on a WIN NT4 SP6a PC, I get a kernel32.dll entry point not found message. Are there any build/release options I can change to get this to work on the WIN NT4 system, or something I can put in my code to fix this I don't thi ...Show All
floris_olivier Preview problem
I have Microsoft Windows Desktop Search installed on a number of computers but on one the preview is not working. No e-mail, contacts etc are previewed. Only a message saying in Swedish "Det gar inte att visa en forhandsgranskning" (approx "preview can not be shown") is shown. Any ideas what to do Thanks Anders Sneckenborg Hi Anders, How odd.. If you look under Desktop Search Options in the Advanced Tab lo ...Show All
skitsystem Single Instance Application in C#
Some one has more better idea to force application to run as single instance than as give below. private static void SingleInstance() { Mutex MyApplicationMutex = new Mutex (true,"MyApplicationMessage"); if (MyApplicationMutex.WaitOne(0, false)) Application.Run(new Form1()); el ...Show All
