|
Sounds suspiciously like the Summer Code Competition[^]. Just remember, if you receive any help from CP (articles or forum posts):You must specify any resources (code, concepts, research etc.) used in creating your article that were not originally produced by you.
Scott Dorman Microsoft® MVP - Visual C# | MCPD
President - Tampa Bay IASA
[ Blog][ Articles][ Forum Guidelines] Hey, hey, hey. Don't be mean. We don't have to be mean because, remember, no matter where you go, there you are. - Buckaroo Banzai
|
|
|
|
|
I was thinking of doing something for this - but having a black hole at the centre of the galaxy and using gravity sling shots to gain higher warp speeds... but then I realized how sad I was!
Dave
|
|
|
|
|
Scott,
It is indeed the Summer Code Competition. I am not actually sure if I will submit it to the competition, I am just using the idea to practice my coding and learn c#. If i was to submit it I would of course aknowledge any help I received, as we all should .
Lee.
|
|
|
|
|
Are you sure a typical galaxy fits in an 8x8 grid?
|
|
|
|
|
sure why not, anything is possible
actually in each of the squares there is another 8x8 grid, thus we have 4096 squares. which is big enough for my purposes.
Lee.
|
|
|
|
|
I can export the database part numbers into an array. I want to be able to search that array with predictive search. a good example is www.yahoo.com's search engine text box on the front page.
How do i achieve this within a windows form and not in a web project. I've searched around for this but have not found much of anything useful.
Thank you guys!
Patrick!
|
|
|
|
|
What have you been able to do so far?
"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
|
|
|
|
|
Have you tried using the Custom AutoComplete function of the textbox?
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
|
I don't know if this is the proper way to do it but I usually do it this way.
1. Create a Datatable
2. Fill the Datatable with the column of interest (Select COLUMN from Table)
3. Use a foreach loop to go thru each row
4. Use a StringBuilder to append those rows
5. Attatch the StringBuilder to the textbox.
I usually doesn't any encounter a very long initialization time using this method. I used it in one of my OPAC projects.
It is said that the most complex structures built by mankind are software systems. This is not generally appreciated because most people cannot see them. Maybe that's a good thing because if we saw them as buildings, we'd deem many of them unsafe.
|
|
|
|
|
|
Hi,
Two comments:
1. I suggest you have a look at String.StartsWith()
2. You might want to store the results of cachedPartNumbers[i].ToString() rather than calling
it all the time
|
|
|
|
|
Hi,
My code is looping through records and adding items to a listbox as below:
forloop
{
lstBox1.items.add("item1");
lstBox1.items.add("item2");
}
Question:
How can I change the colour of SOME of the items as they are being added?
Thanks
|
|
|
|
|
Hi,
there are two basic features you need:
- ListBoxes can contain items of any type, not just strings
- you can paint those items yourself (DrawMode OwnerDrawn, event DrawItem)
So the neat way to do this is define a little class (say MyItem) and let it hold a string and
some style field (maybe a Color). Add instances of that class to the ListBox, make it OwnerDrawn,
and provide a DrawItem handler according to your wishes.
As a shortcut, when I only need two variations (say black and red), I skip the MyItem stuff and
prefix the red items with a special character (say '~'), then in DrawItem check the first char,
and if a '~', choose Color.Red and drop the '~'.
|
|
|
|
|
Hi,
I am not a good c# developer so not sure how to do what you suggested.
Can you make it simpler or guide me through it further please?
Thanks
|
|
|
|
|
Sorry, no spoon feeding here. I gave you all the required keywords, let Google and MSDN provide you
with the details; and CodeProject holds thousands of interesting articles too.
PS: don't switch Controls, if ListBox is your first choice, stick with it. It is a very good performer.
|
|
|
|
|
|
Luc Pattyn wrote: Sorry, no spoon feeding here.
He may not get what he wants (maybe mashed peas, squash, etc)
"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
|
|
|
|
|
For a start, the loop is incorrect. It'd probably be something like this
for(int i = 0; i<3; i++)
{
lstBox1.Items.Add("item" + i.ToString("N0"));
}
Also, the standard ListBox cannot do that on its own. You could paint it yourself if you have a good grasp of the Graphics object, or you could use the ListView. The loop would change to something like this
for(int i = 0; i<3; i++)
{
ListViewItem lvi = new ListViewItem("item" + i.ToString("N0"));
lvi.BackColor = Color.White;
ListView1.Items.Add(lvi);
}
|
|
|
|
|
Hi,
I am trying to use a listview to make this easier.
Do you know why I do not get Color in the intellisense please?
Thanks
|
|
|
|
|
Have you added
using System.Drawing;
to the top of the file?
|
|
|
|
|
|
Hi all,
Can anyone help...im trying to figure out a way to get the value to text of a node...the problem is that my query returns around 2000 rows...i want to make it that i must click on a node to get its subnodes...how will i go about doing this?
living life on the flip side
|
|
|
|
|
|
Hello,
I am working in my application with xml files and mdb file,I don't want user view these files I want to put them in the app assembly.
Thanks.
Dad
|
|
|
|