Click here to Skip to main content
15,906,574 members
Home / Discussions / C#
   

C#

 
GeneralRe: I'm getting demolished by an easy SELECT statement, help. Pin
Expert Coming22-May-07 14:55
Expert Coming22-May-07 14:55 
GeneralRe: I'm getting demolished by an easy SELECT statement, help. Pin
ThisIsMyUserName222-May-07 15:01
ThisIsMyUserName222-May-07 15:01 
AnswerRe: I'm getting demolished by an easy SELECT statement, help. Pin
Dave Herren22-May-07 15:21
Dave Herren22-May-07 15:21 
GeneralRe: I'm getting demolished by an easy SELECT statement, help. Pin
ThisIsMyUserName222-May-07 15:33
ThisIsMyUserName222-May-07 15:33 
AnswerRe: C# Consoles & Windows Forms Pin
Dave Herren22-May-07 15:08
Dave Herren22-May-07 15:08 
QuestionArray Shift Register Pin
cmarcus22-May-07 12:45
cmarcus22-May-07 12:45 
AnswerRe: Array Shift Register Pin
Guffa22-May-07 12:59
Guffa22-May-07 12:59 
GeneralRe: Array Shift Register Pin
cmarcus23-May-07 2:22
cmarcus23-May-07 2:22 
Here's the sample code for what I'm trying to do. I actually have a 2D array. It's an array of pictureBox arrays. If you picture it like a grid with rows and columns. I want to foreach row, I want to shift each column back one, and set the first element to a new image. Here's the code (two for loops)

// Shift the lane to the right //

// Loop through each array (row) //
for(int i = 0; i < allLanes.Length; i++)
{
// Loop through each element in the array (column) //
// From back to front //
for(int j = allLanes[i].Length-1; j > 0; j--)
{
// If the previous element's image is the failed image //
if(allLanes[i][j-1].Image == failImg)
{
// Set the previous element to a pass image //
allLanes[i][j-1].Image = passImg;

// Set the current elemtn to a fail image //
allLanes[i][j].Image = failImg; }
else
{
// Set the current element to a pass image //
allLanes[i][j].Image = passImg;
}

// Thread.Sleep(1); //
}


Note the Thread.Sleep(1). If I remove this, the code start to bomb out saying either: System.Drawing element is in use elsewhere or sometimes the display simply doesn't finish updating with only some of the rows showing the shift.
GeneralRe: Array Shift Register Pin
Martin#23-May-07 3:32
Martin#23-May-07 3:32 
QuestionInsert into MS Access database using C#.Net Pin
sunkkd22-May-07 9:37
sunkkd22-May-07 9:37 
AnswerRe: Insert into MS Access database using C#.Net Pin
Pete O'Hanlon22-May-07 9:59
mvePete O'Hanlon22-May-07 9:59 
AnswerRe: Insert into MS Access database using C#.Net Pin
led mike22-May-07 10:01
led mike22-May-07 10:01 
AnswerRe: Insert into MS Access database using C#.Net Pin
Hamid_RT23-May-07 2:11
Hamid_RT23-May-07 2:11 
QuestionCreate pop-up message Pin
diddy3422-May-07 9:07
diddy3422-May-07 9:07 
AnswerRe: Create pop-up message Pin
Muammar©22-May-07 9:21
Muammar©22-May-07 9:21 
AnswerRe: Create pop-up message Pin
Hamid_RT23-May-07 2:18
Hamid_RT23-May-07 2:18 
QuestionCenter Text on Custom Button Pin
PHDENG8122-May-07 7:17
PHDENG8122-May-07 7:17 
AnswerRe: Center Text on Custom Button Pin
Manoj Kumar Rai22-May-07 8:02
professionalManoj Kumar Rai22-May-07 8:02 
GeneralRe: Center Text on Custom Button Pin
PHDENG8122-May-07 8:29
PHDENG8122-May-07 8:29 
AnswerRe: Center Text on Custom Button Pin
Ian Shlasko22-May-07 10:34
Ian Shlasko22-May-07 10:34 
GeneralRe: Center Text on Custom Button Pin
PHDENG8123-May-07 0:45
PHDENG8123-May-07 0:45 
GeneralRe: Center Text on Custom Button Pin
Ian Shlasko24-May-07 3:40
Ian Shlasko24-May-07 3:40 
GeneralRe: Center Text on Custom Button Pin
PHDENG8124-May-07 4:38
PHDENG8124-May-07 4:38 
QuestionDisabling controls without changing appearance Pin
Ian Shlasko22-May-07 6:13
Ian Shlasko22-May-07 6:13 
AnswerRe: Disabling controls without changing appearance Pin
Dave Herren22-May-07 6:33
Dave Herren22-May-07 6:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.