Click here to Skip to main content
15,885,125 members
Home / Discussions / C#
   

C#

 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 10:02
User 680178016-Feb-10 10:02 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178016-Feb-10 10:09
User 680178016-Feb-10 10:09 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178017-Feb-10 7:05
User 680178017-Feb-10 7:05 
AnswerRe: Cross-Threading problem, InvokeRequired and Events Pin
#realJSOP15-Feb-10 23:21
mve#realJSOP15-Feb-10 23:21 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178019-Feb-10 4:10
User 680178019-Feb-10 4:10 
GeneralRe: Cross-Threading problem, InvokeRequired and Events Pin
User 680178019-Feb-10 8:06
User 680178019-Feb-10 8:06 
QuestionC# TableLayoutPanel MouseLeave Pin
ikurtz15-Feb-10 5:27
ikurtz15-Feb-10 5:27 
AnswerRe: C# TableLayoutPanel MouseLeave Pin
AhsanS15-Feb-10 5:48
AhsanS15-Feb-10 5:48 
<pre>
if (GameModel.HomeCellStatus(homeLastPosition.Column, homeLastPosition.Row) == Cell.cellState.WATER)
{
HomeLastPicBox.Image = Properties.Resources.water;
MessageBox.Show("hi");
}

</pre>

i wonder why are you using this
<pre>HomeLastPicBox = new PictureBox();</pre>
when you have already assigned the picture to this picture box in the if block. after displaying the message box you need to return.

do it like this.
<pre>
if (GameModel.HomeCellStatus(homeLastPosition.Column, homeLastPosition.Row) == Cell.cellState.WATER)
{
HomeLastPicBox.Image = Properties.Resources.water;
MessageBox.Show("hi");
return;
}

hope it helps.

</pre>

Ahsan Ullah
Senior Software Engineer
MCTS 2.0
GeneralRe: C# TableLayoutPanel MouseLeave Pin
ikurtz15-Feb-10 6:21
ikurtz15-Feb-10 6:21 
QuestionProblem using a class Pin
msg5512115-Feb-10 4:59
msg5512115-Feb-10 4:59 
AnswerRe: Problem using a class Pin
vaghelabhavesh15-Feb-10 5:04
vaghelabhavesh15-Feb-10 5:04 
GeneralRe: Problem using a class Pin
msg5512115-Feb-10 5:31
msg5512115-Feb-10 5:31 
GeneralRe: Problem using a class Pin
vaghelabhavesh15-Feb-10 5:53
vaghelabhavesh15-Feb-10 5:53 
QuestionIP Address Pin
sanforjackass15-Feb-10 4:16
sanforjackass15-Feb-10 4:16 
AnswerRe: IP Address Pin
Migounette15-Feb-10 4:18
Migounette15-Feb-10 4:18 
GeneralRe: IP Address Pin
sanforjackass15-Feb-10 4:43
sanforjackass15-Feb-10 4:43 
GeneralRe: IP Address Pin
Dave Kreskowiak15-Feb-10 5:46
mveDave Kreskowiak15-Feb-10 5:46 
AnswerRe: IP Address Pin
Som Shekhar15-Feb-10 5:55
Som Shekhar15-Feb-10 5:55 
GeneralRe: IP Address Pin
sanforjackass15-Feb-10 9:20
sanforjackass15-Feb-10 9:20 
GeneralRe: IP Address Pin
Som Shekhar15-Feb-10 18:04
Som Shekhar15-Feb-10 18:04 
GeneralRe: IP Address Pin
sanforjackass15-Feb-10 21:37
sanforjackass15-Feb-10 21:37 
GeneralRe: IP Address Pin
Som Shekhar15-Feb-10 21:39
Som Shekhar15-Feb-10 21:39 
GeneralMessage Removed Pin
15-Feb-10 22:06
sanforjackass15-Feb-10 22:06 
GeneralRe: IP Address Pin
Som Shekhar15-Feb-10 22:08
Som Shekhar15-Feb-10 22:08 
GeneralRe: IP Address Pin
sanforjackass15-Feb-10 22:12
sanforjackass15-Feb-10 22:12 

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.