|
Sorry....
It was only a joke. No harm intended. Sorry again!
SkyWalker
|
|
|
|
|
Do not apologize to these clowns that ask people to do the work for them. There is no need to do so.
|
|
|
|
|
It may have been an offense to his child / children. That's why I said "sorry".
SkyWalker
|
|
|
|
|
A great help? You're looking for someone to do the work for you!!! That's not what this site is about.
Come up with a well thought out plan, first. If you want the code, open up Visual Studio and start writing it.
|
|
|
|
|
yeh you are probably right and i have no problem in trying out myself.
But i could find hell lot of codes in few sites like planet-code, source-code etc but none of them contains any codes for educational software.
As i told you i dont have much experience with C#.net so i would like to check out few already coded s/w just for reference and to get different ideas..
I hope you got my point....I dont mean to copy the whole stuff....
Thanks for reply
|
|
|
|
|
Software_Specialist wrote: ....I dont mean to copy the whole stuff....
If you can't "kid" yourself, who can you "kid"? The entire thread wreaks of "I need this done, but I hope I don't have to do it myself."
Start by coming up with an original idea, then a project plan, then completely spec it out. At that point, you are ready to start coding it yourself. If/when you run into programming trouble, you post specific questions here, and we will gladly assist. Nobody is going to do the work for you.
In fact, when you ask for codes to create you own game, that's nothing more than copying someone else's game, and trying to take credit for it.
|
|
|
|
|
Ok fine i agree but to know what all is possible with C#.NET i need to look at to some already developed application.
I have got many ideas but i dont know if thats possible with C# or not. Ok if everything is possible with it then can i start my application with seleceting windows application project which would be including animated stuff, gaming stuff, sound, and the normal stuff.
Or is there any other way to start such applications.
C
|
|
|
|
|
Have a look at this[^].
SkyWalker
|
|
|
|
|
This article could be of great help...
Ill go through it ...
Now you got my point what i was trying to say....
Thanks
|
|
|
|
|
... I got it from the beginning ...
SkyWalker
|
|
|
|
|
Hello,
If I have a full path to the selected node, is there a way to expand the treeview after I refresh it, to that particular node using the path?
Thank you!
|
|
|
|
|
string nodeToFind = "node11"; // node's you want to show name
TreeNode[] nodes = treeView1.Nodes.Find(nodeToFind, true);
if(nodes != null && nodes.Length > 0){
TreeNode node = nodes[0];
while(node != treeView1.TopNode){
node.Parent.Expand();
node = node.Parent;
}
}
life is study!!!
|
|
|
|
|
Thank you very much. The only problem, if you don't set the name of the node, you are out of luck.
|
|
|
|
|
Whenever you add a node, get its full path and store it into node's name.
<br />
TreeNode tn = this.treeView1.Nodes.Add("AAA");<br />
tn.Name = tn.FullPath;<br />
When you want to expand the node having, let's say, "The_wanted_path"
you use this:
TreeNode [] tn = this.treeView1.Nodes.Find("The_wanted_path", true);
if ( tn[0] != null )
{
TreeNode Parent = tn[0].Parent;
TreeNode FirstParent = Parent;
while (Parent != null)
{
Parent = Parent.Parent;
if (Parent != null) FirstParent = Parent;
}
tn[0].Expand();
if (FirstParent != null) FirstParent.Expand();
}
SkyWalker
|
|
|
|
|
How can i assign any values to datagridcombobox cell?
Thanks
|
|
|
|
|
<br />
for(int i = 0;i<10;i++)<br />
{<br />
dataGridView1.Rows.Add();<br />
DataGridViewComboBoxColumn mycol = new DataGridViewComboBoxColumn();<br />
mycol.Items.Add("i");<br />
dataGridView1.Columns.Add(mycol);<br />
}<br />
<br />
Ufff, again i answared it
|
|
|
|
|
Hi,
How do you stop listview columns been able to be resized? I want to lock the column sizes.
Thanks in Advance.
Rapier503
|
|
|
|
|
Add the handler for the ColumnWidthChanging event. Be it private void listView1_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
Then put these 2 lines of code inside:
private void listView1_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e)
{
e.Cancel = true;
e.NewWidth = -1;
}
SkyWalker
|
|
|
|
|
Greetings!
I have two fields, one int and one string. The string stores an integer value. I have to check these fields for equality. I don't know if I should compare them as integers or as strings.
I'm more for string comparison, since then I don't have to worry about getting an exception (as opposed to using Int32.Parse), so I don't need to use a try-catch block. Then again, the string gets its value as someint.ToString(), so parsing it shouldn't throw any Exceptions. Also I think comparing two integers should be a bit faster then is the case with strings. Any thoughts on the subject?
|
|
|
|
|
You should of course not store an integer as a string in the first place, but I assume that you know that, and that the storage is out of your control...
Comparing integers are of course faster than comparing strings, but I'm not sure that the actual comparison is a large enough part of the entire operation for that to make any real difference.
To compare the values as strings you have to be absolutely positive that the format of the strings are always exactly the same, as the strings "42", " 42", "042", "42.0" and "0x2a" won't be equal although they contain the same value.
---
Year happy = new Year(2007);
|
|
|
|
|
As I said before, the string is actually someint.ToString(). To be more precise, I'm actually getting a hidden field value in ASP.NET, which is of course a string. Since I set the value of the hidden field (on the client side), I also know the format, which happens to be the plain "42" type. Obviously in this case favoring one comparison over another doesn't actually make a difference at all. I was just curious if someone knows a best practice for this kind of problem. Perhaps in the future I will come across a similiar situation, where the differences in comparison time do matter. It's just like those someString.Length > 0 vs. someString != String.Empty questions.
[edit]Actually the problem is pretty much like the problem I mentioned as an example, as I am willing to except a third choice, if possible, like String.IsNullOrEmpty(someString) is for the example above [/edit]
-- modified at 9:33 Friday 12th January, 2007
|
|
|
|
|
Well, if you only have one string value and a lot of integers, then you should obviously convert the string to an integer.
Look at the number of string operations that you have to do to using different methods. Integer comparisons are so cheap in comparison that they can be ignored.
If you convert the string to an integer, you have a single string operation. If you convert the integers to strings, you will have one string operation per value.
If you on the other hand had a single integer value to compare to a lot of strings:
If you convert each string to an integer and the compare the integers, you have one string operation per value. If you convert the integer value to a string and then compare that to each string, you have one string operation per value plus an additional string operation. In this case the methods will cost about the same.
---
Year happy = new Year(2007);
|
|
|
|
|
You do not have to worry about exceptions if you use Int32.TryParse().
I would go for integer comparison.
SkyWalker
|
|
|
|
|
szukuro wrote: I'm more for string comparison, since then I don't have to worry about getting an exception
if the string must contain a value representing an int then you have to worry about.
Moreover, if you compare strings maybe you don't get what you expect, for instance:
" 15" is not equal to "15" .
Cheers
If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.
|
|
|
|
|
Well if the two strings can be the same and then the integers of the strings will be the same. But if you use lets say: Convert.ToInt32(string val) part of the System? namespace. If the ints are the same then the strings should be the same. The may be some circumstances or possibly exceptions if the string you are trying to convert has letters and numbers in them.
string a, b;
a="123"
b="123"
a equals b - when comparing the string values
Convert.ToInt32(a) equals Convert.ToInt32(b) - when comparing the integers of the string
a="L123"
b="L123"
a equals b - when comparing the string values
Convert.ToInt32(a) does not equal Convert.ToInt32(b) - will probably cause an exception or it may convert the letter 'L' to asc, I'm not real sure
Regards,
Thomas Stockwell
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning.
Visit my homepage Oracle Studios[ ^]
|
|
|
|