How Can I make my Program Faster?

Pages: 12
@thmm. That works perefectly thanks! And that link looks really useful.

I was able to take this...
1
2
3
4
5
6
7
8
9
10
11
12
private: System::Void listBox1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e)
{
	
	if (listBox1->SelectedIndex == 1)
	{
		if (checkBox163B_Song_ID == 1)
		{
			checkBox231->BackColor = Color::Green;
		}
               else checkBox231->BackColor = Color::White;
        }
}

1
2
3
4
5
6
7
8
9
10
11
12
private: System::Void listBox1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e)
{
	
	int i = listBox1->SelectedIndex;


	if (checkBox163B_Song_ID == i)
	{
		checkBox231->BackColor = Color::Green;
	}
	else checkBox231->BackColor = Color::White;
}

and replace it with this...

Now the window loads in less then a second. 32 times faster. :)

Thanks again everyone for all the advice. I will use it from now on, just don't want to start from scratch.
Topic archived. No new replies allowed.
Pages: 12