|
You don't need recursion here. Once you have a string array that contains name3, name4, etc, step through them. At each step, search for te node with that name, if it exists, step in, if not, create it.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
I am reading a couple of thousand entrys at a time from a database. I'm not adding to an existing tree I am building a new one on the fly.
I was trying to..
once i added name3 i wanted to add all if the name4 items that belonged to it.
Then all the name5's that belong to name4 etc.
I'm thinking recursion is the only efficient way of doing this. But I have been wrong before.
tia
Rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Recursion is a waste of time when you know in advance the number of steps you need to take.
Christian Graus
Driven to the arms of OSX by Vista.
|
|
|
|
|
Problem is...I don't know ahead of time the number of steps I need to take.
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
I am a new to use Chart Control, I have the following two questions:
1: How to select the object such as line in Chart with multiple Series, it seems that Chart Forum also has these questions, but no reply so far, anyone can give one idea for it?
2: It seems current Chart Control can not be used to plot true 3D charts, such as f(x,y,z), am I right? The so called 3D charts in the help files are not true 3D charts, I think.
thanks.
|
|
|
|
|
What Chart Control? There are a few around you know.
|
|
|
|
|
Pete O'Hanlon wrote: What Chart Control?
Did you leave your crystal ball at home again?
led mike
|
|
|
|
|
I am also new to the chart control but I have found out that you can have multiple series using the y axis.
If you look at the samples of code that came with the chart control there are many examples of doing what you are talking about.
Have a look at this site and download the samples.
http://code.msdn.microsoft.com/mschart[^]
hope this helps
rafone
Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
|
|
|
|
|
Does anyone know how I can get the current screen Color Quality. I can get the resolution but am stuck finding the quality.
Thanks
Michael
|
|
|
|
|
Hi,
the only way I am aware of is through P/Invoke, using
[DllImport("user32.dll")]
public static extern int EnumDisplaySettings (string deviceName,
int modeNum, ref DEVMODE1 devMode );
[StructLayout(LayoutKind.Sequential)]
public struct DEVMODE1 {
[MarshalAs(UnmanagedType.ByValTStr,SizeConst=32)] public string dmDeviceName;
public short dmSpecVersion;
public short dmDriverVersion;
public short dmSize;
public short dmDriverExtra;
public int dmFields;
public short dmOrientation;
public short dmPaperSize;
public short dmPaperLength;
public short dmPaperWidth;
public short dmScale;
public short dmCopies;
public short dmDefaultSource;
public short dmPrintQuality;
public short dmColor;
public short dmDuplex;
public short dmYResolution;
public short dmTTOption;
public short dmCollate;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = 32)] public string dmFormName;
public short dmLogPixels;
public short dmBitsPerPel;
public int dmPelsWidth;
public int dmPelsHeight;
public int dmDisplayFlags;
public int dmDisplayFrequency;
public int dmICMMethod;
public int dmICMIntent;
public int dmMediaType;
public int dmDitherType;
public int dmReserved1;
public int dmReserved2;
public int dmPanningWidth;
public int dmPanningHeight;
};
with mode set to ENUM_CURRENT_SETTINGS (=-1)
|
|
|
|
|
SO I have to pass the Display card name to this function and then get the info from dmcolor?
If I don't know the Display card name and this is dunning on over 250 machine with different cards how do I get this info?
Thanks
|
|
|
|
|
I did provide you with some pointers and useful code.
For the details they invented a thing called documentation[^] which google will be happy to locate for you.
|
|
|
|
|
Thanks for your help. I've been googling all afternoon trying to find this info and understand it.
Hope you have a good evening.
|
|
|
|
|
Hi guys, I am having difficutly downloading msdn/msnd2 for Visual Studio 2005. Can anyone of you please provide me a link so i can download Visual 2005 2.0 msdn.
Thanks
|
|
|
|
|
|
Hi I am creating an application through which the user can select a mode and that will change the icon. I have added different icons to my project but don't know how to change the icon.
Note: What I'm trying to do is not the same as going into properties in visual studios and changing the icon.
Any help would be great.
Thanks,
Prateek
|
|
|
|
|
Hi,
a file has an icon in Windows Explorer; for an EXE file that icon is set at build time through the project properties.
a Form most often has a visible icon in the title bar; that one is set through the Icon property of the Form, either through Visual Designer or by run-time code. It is also used in the task bar and in the task switcher (ALT-TAB). You would typically add one or more ICO files to the project, set them to be handled as an "embedded resource", then load them from there e.g. with the Icon constructor that takes a Type and a resource name. You can also see how Visual Designer does it, and copy and adapt that code.
|
|
|
|
|
you mean
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
but, what is "$this.Icon" referring to? and from where can I change the location of the icon?
Prateek
|
|
|
|
|
No, first use Visual Designer to assign some icon to the Form other than the application icon (that is the default and generates the line you quoted). Then look at the VD code and work from there.
|
|
|
|
|
That's exactly what I did and found this code in the designer.
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
I also tried looking for the filename, but couldn't find it. Where should I be looking? and/or what should I do now?
|
|
|
|
|
Sorry, I got confused about resources once more.
1.
The icon you assign to Form myForm using VD gets stored in file myForm.resx, and the $this then refers to myForm.
2.
This is the code you need to activate an embedded icon resource (Build Action=embedded resource) in general:
this.Icon=new Icon(this.GetType(), "name.ico");
assuming the file is at the top-level of your solution.
If you put it in say directory resources , then the name changes to "resources.name.ico"
|
|
|
|
|
Thanks a lot. That was very helpful information.
Prateek
|
|
|
|
|
hai gud evening,
if i can get data from database for that i can use combo box,i can select one item in combo box but the corresponding item didnot display,another item should be display to the first time selection of the combo box but i can select another time the correct item should be display,whats wrong in my coding
plz give me a solution to my problem.
thanking u.
|
|
|
|
|
Ok, post your code so we can take a look at it, we can't guess what you wrote and ask us what's wrong with it.
Also try to clean up your question I'm having an extremely hard time understanding what it is you want.
|
|
|
|
|
Hi,
What do you mean exactly? send some code, maybe then we can help.
|
|
|
|