Click here to Skip to main content
15,897,891 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reading files Pin
satsumatable17-Apr-09 2:27
satsumatable17-Apr-09 2:27 
GeneralRe: Reading files Pin
stancrm17-Apr-09 2:29
stancrm17-Apr-09 2:29 
AnswerRe: Reading files Pin
stancrm17-Apr-09 2:28
stancrm17-Apr-09 2:28 
GeneralRe: Reading files Pin
satsumatable17-Apr-09 2:31
satsumatable17-Apr-09 2:31 
GeneralRe: Reading files Pin
stancrm17-Apr-09 2:36
stancrm17-Apr-09 2:36 
GeneralRe: Reading files Pin
Alan Balkany17-Apr-09 3:42
Alan Balkany17-Apr-09 3:42 
QuestionA security exception was not handled in your code Pin
lachu00917-Apr-09 2:07
lachu00917-Apr-09 2:07 
Questioncross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady17-Apr-09 1:19
But_Im_a_Lady17-Apr-09 1:19 
Hi All,

After spending ages on google trying to understand & recify my problem, and having no success, I am hoping someone here can point me in the right direction.

Here is my problem...

I have a windows form, which has a selection of standard toolbox controls and custom User controls, some of which are added at design time & some of which are added at run time.

This all works fine, but when I close the form I get this message:-

"Cross-thread operation no valid: Control 'chkShowSparesMatrix' accessed from a thread other than the thread it was created on".

This control is a standard MS check box which is added at design time. None of its properties are changed in code, the only event which is acted upon is 'checkedchanged':-

private void chkShowSparesMatrix_CheckedChanged(object sender, EventArgs e)
{
    if (chkShowSparesMatrix.Checked)
    {
        usrSparesMatrix1.IsStandAlone = false;
        usrSparesMatrix1.Visible = true;
    }
    else
    {
        usrSparesMatrix1.IsStandAlone = false;
        usrSparesMatrix1.Visible = false;
    }
}


If I remove this control, I get the same message on another control.

If anyone can throw light on this for me I would be grateful, or if you need more info to understand my problem I can forward you this.

Thanks in advance,

Janet

Lady Programmers are a rare breed!

AnswerRe: cross thread operation not valid, when closing a windows form Pin
Henry Minute17-Apr-09 1:55
Henry Minute17-Apr-09 1:55 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady17-Apr-09 2:05
But_Im_a_Lady17-Apr-09 2:05 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
Henry Minute17-Apr-09 2:12
Henry Minute17-Apr-09 2:12 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady17-Apr-09 2:14
But_Im_a_Lady17-Apr-09 2:14 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady17-Apr-09 2:25
But_Im_a_Lady17-Apr-09 2:25 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
Henry Minute17-Apr-09 2:39
Henry Minute17-Apr-09 2:39 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady17-Apr-09 2:49
But_Im_a_Lady17-Apr-09 2:49 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
Henry Minute17-Apr-09 2:59
Henry Minute17-Apr-09 2:59 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady20-Apr-09 1:16
But_Im_a_Lady20-Apr-09 1:16 
AnswerRe: cross thread operation not valid, when closing a windows form Pin
12Code17-Apr-09 2:06
12Code17-Apr-09 2:06 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady17-Apr-09 2:15
But_Im_a_Lady17-Apr-09 2:15 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady17-Apr-09 2:22
But_Im_a_Lady17-Apr-09 2:22 
AnswerRe: cross thread operation not valid, when closing a windows form Pin
0x3c017-Apr-09 2:46
0x3c017-Apr-09 2:46 
GeneralRe: cross thread operation not valid, when closing a windows form Pin
But_Im_a_Lady17-Apr-09 2:54
But_Im_a_Lady17-Apr-09 2:54 
AnswerRe: cross thread operation not valid, when closing a windows form Pin
Luc Pattyn17-Apr-09 4:01
sitebuilderLuc Pattyn17-Apr-09 4:01 
QuestionNeed Help For Reading and Sending SMS Through SonyEricsson Mobile Using C# Language Pin
A.Q.Ghouri17-Apr-09 1:15
A.Q.Ghouri17-Apr-09 1:15 
AnswerRe: Need Help For Reading and Sending SMS Through SonyEricsson Mobile Using C# Language Pin
Rajesh Anuhya17-Apr-09 1:22
professionalRajesh Anuhya17-Apr-09 1:22 

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.