Click here to Skip to main content
15,924,828 members
Home / Discussions / C#
   

C#

 
Questionblocking all windows operations or locking system Pin
Xmen Real 4-Dec-08 5:47
professional Xmen Real 4-Dec-08 5:47 
AnswerRe: blocking all windows operations or locking system Pin
Dave Kreskowiak4-Dec-08 6:11
mveDave Kreskowiak4-Dec-08 6:11 
GeneralRe: blocking all windows operations or locking system Pin
Xmen Real 4-Dec-08 6:16
professional Xmen Real 4-Dec-08 6:16 
GeneralRe: blocking all windows operations or locking system Pin
Dave Kreskowiak4-Dec-08 8:03
mveDave Kreskowiak4-Dec-08 8:03 
GeneralRe: blocking all windows operations or locking system Pin
Xmen Real 4-Dec-08 13:37
professional Xmen Real 4-Dec-08 13:37 
GeneralRe: blocking all windows operations or locking system Pin
Xmen Real 4-Dec-08 14:49
professional Xmen Real 4-Dec-08 14:49 
QuestionPictureBox Control Arrays Pin
tim_gunning4-Dec-08 5:25
tim_gunning4-Dec-08 5:25 
AnswerRe: PictureBox Control Arrays Pin
User 66584-Dec-08 5:30
User 66584-Dec-08 5:30 
So you want to change the color on the picture box you clicked on last, is this correct?
If yes, then you could for example store the last selected picture box in a variable:

PictureBox lastSelectedPictureBox = null;
	
private void pictureBox_MouseDown(object sender, MouseEventArgs e)
{
   lastSelectedPictureBox = sender as PictureBox;
}


and in your button click handler:

public void button2_Click(object sender, System.EventArgs e)
{
   lastSelectedPictureBox.BackColor = Color.Red;
}


You could also set the "selected" property of the last selected PictureBox into the Tag property, if it's not already used for other purposes. Btu then you'd need to loop over the entire array to get the last selected picture box, so I prefer the method above.


regards

modified 12-Sep-18 21:01pm.

GeneralRe: PictureBox Control Arrays Pin
tim_gunning4-Dec-08 6:10
tim_gunning4-Dec-08 6:10 
QuestionHow to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
trilokharry4-Dec-08 4:56
trilokharry4-Dec-08 4:56 
AnswerRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
Wendelius4-Dec-08 5:09
mentorWendelius4-Dec-08 5:09 
GeneralRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
led mike4-Dec-08 5:21
led mike4-Dec-08 5:21 
GeneralRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
Wendelius4-Dec-08 5:27
mentorWendelius4-Dec-08 5:27 
GeneralRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
led mike4-Dec-08 5:33
led mike4-Dec-08 5:33 
GeneralRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
Wendelius4-Dec-08 5:41
mentorWendelius4-Dec-08 5:41 
GeneralRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
dan!sh 4-Dec-08 5:49
professional dan!sh 4-Dec-08 5:49 
GeneralRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
Wendelius4-Dec-08 6:53
mentorWendelius4-Dec-08 6:53 
GeneralRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
led mike4-Dec-08 6:14
led mike4-Dec-08 6:14 
AnswerRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
Pr@teek B@h!4-Dec-08 5:33
Pr@teek B@h!4-Dec-08 5:33 
GeneralRe: How to insert xmlDocument variable data or xml in column of table in sql server 2000 Pin
trilokharry4-Dec-08 19:37
trilokharry4-Dec-08 19:37 
QuestionHow to convert string to xml Pin
trilokharry4-Dec-08 4:51
trilokharry4-Dec-08 4:51 
AnswerRe: How to convert string to xml Pin
led mike4-Dec-08 4:55
led mike4-Dec-08 4:55 
AnswerRe: How to convert string to xml Pin
J4amieC4-Dec-08 4:55
J4amieC4-Dec-08 4:55 
Questionquestion in word automation Pin
hatan864-Dec-08 4:22
hatan864-Dec-08 4:22 
AnswerRe: question in word automation Pin
dan!sh 4-Dec-08 4:25
professional dan!sh 4-Dec-08 4:25 

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.