Click here to Skip to main content
15,917,005 members
Home / Discussions / C#
   

C#

 
GeneralRe: Class Not Registered Error (HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) Pin
Clifford Anup4-Mar-10 8:25
Clifford Anup4-Mar-10 8:25 
GeneralRe: Class Not Registered Error (HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)) Pin
Dave Kreskowiak4-Mar-10 9:05
mveDave Kreskowiak4-Mar-10 9:05 
QuestionC# Code example for adding File Attachments (when using Zetafax) Pin
But_Im_a_Lady4-Mar-10 3:35
But_Im_a_Lady4-Mar-10 3:35 
QuestionDetect if Application.Restart Fails. Pin
kevinnicol4-Mar-10 3:26
kevinnicol4-Mar-10 3:26 
AnswerRe: Detect if Application.Restart Fails. Pin
Alan N4-Mar-10 8:09
Alan N4-Mar-10 8:09 
GeneralRe: Detect if Application.Restart Fails. Pin
kevinnicol4-Mar-10 8:17
kevinnicol4-Mar-10 8:17 
GeneralRe: Detect if Application.Restart Fails. [modified] Pin
Alan N4-Mar-10 13:19
Alan N4-Mar-10 13:19 
QuestionMy service must run my form Pin
Andy_R4-Mar-10 2:37
Andy_R4-Mar-10 2:37 
AnswerRe: My service must run my form Pin
Gonzoox4-Mar-10 3:35
Gonzoox4-Mar-10 3:35 
GeneralRe: My service must run my form Pin
Andy_R4-Mar-10 3:42
Andy_R4-Mar-10 3:42 
GeneralRe: My service must run my form Pin
Andy_R5-Mar-10 2:08
Andy_R5-Mar-10 2:08 
GeneralRe: My service must run my form Pin
Andy_R5-Mar-10 3:10
Andy_R5-Mar-10 3:10 
Questionparameter count mismatch listBox. Pin
arsendem4-Mar-10 2:30
arsendem4-Mar-10 2:30 
AnswerRe: parameter count mismatch listBox. Pin
Not Active4-Mar-10 3:04
mentorNot Active4-Mar-10 3:04 
AnswerMessage Closed Pin
4-Mar-10 3:05
stancrm4-Mar-10 3:05 
GeneralRe: parameter count mismatch listBox. Pin
arsendem4-Mar-10 3:20
arsendem4-Mar-10 3:20 
When I wish to use listBox1 in a thread gives out an error:
"Cross-thread operation not valid: Control 'listBox1' accessed from a thread other
than the thread it was created on.".


I badly understand delegates.

public delegate void ListBoxCallback(string s);
public void listBox_1_ItemsAdd(string value1)
{
ListBoxCallback callback = new ListBoxCallback(listBox_1_ItemsAdd);
Invoke(callback); // Here a problem: "parameter count mismatch"
listBox1.Items.Add(value1);
}

I transfer to a method listBox_1_ItemsAdd string value value1.
listBox_1_ItemsAdd(dataGridView1[2, i].Value.ToString());

Also, how to transfer parametre here.
private delegate void ChangeProgressBarCallback(int size);
public void changeProgressBar(int MaxSize)
{
if (progressBar1.InvokeRequired)
{
// instantiate the callback instance out of this very method
ChangeProgressBarCallback callback = new ChangeProgressBarCallback(changeProgressBar);
// invoke it, when it comes to it again InvokeRequired will be false
Invoke(callback);
}
else
{
progressBar1.Minimum = 0;
progressBar1.Maximum = MaxSize;
progressBar1.Step = 1;
for (int x = 1; x <= MaxSize; x++)
{
progressBar1.PerformStep();
}
}
}
How to transfer parametre in the delegate.
That I to do not so prompt pleaseConfused | :confused:
Questionappend to excel file c# !! Pin
noamtzu004-Mar-10 1:42
noamtzu004-Mar-10 1:42 
AnswerRe: append to excel file c# !! Pin
Not Active4-Mar-10 1:57
mentorNot Active4-Mar-10 1:57 
GeneralI know this, but more comfortable working with ..... Pin
noamtzu004-Mar-10 2:41
noamtzu004-Mar-10 2:41 
GeneralRe: I know this, but more comfortable working with ..... Pin
Not Active4-Mar-10 2:59
mentorNot Active4-Mar-10 2:59 
GeneralRe: I know this, but more comfortable working with ..... Pin
noamtzu004-Mar-10 7:16
noamtzu004-Mar-10 7:16 
GeneralRe: I know this, but more comfortable working with ..... Pin
Mirko19804-Mar-10 3:15
Mirko19804-Mar-10 3:15 
GeneralRe: I know this, but more comfortable working with ..... Pin
noamtzu004-Mar-10 7:15
noamtzu004-Mar-10 7:15 
GeneralRe: I know this, but more comfortable working with ..... Pin
Dave Kreskowiak4-Mar-10 3:45
mveDave Kreskowiak4-Mar-10 3:45 
GeneralRe: I know this, but more comfortable working with ..... Pin
noamtzu004-Mar-10 7:14
noamtzu004-Mar-10 7:14 

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.