Click here to Skip to main content
15,903,854 members
Home / Discussions / C#
   

C#

 
GeneralRe: active single instance only Pin
Luc Pattyn27-Oct-09 4:16
sitebuilderLuc Pattyn27-Oct-09 4:16 
AnswerRe: active single instance only Pin
anishkannan27-Oct-09 1:47
anishkannan27-Oct-09 1:47 
AnswerRe: active single instance only Pin
vtchris-peterson28-Oct-09 5:43
vtchris-peterson28-Oct-09 5:43 
GeneralRe: active single instance only Pin
reza assar9-Nov-09 18:41
reza assar9-Nov-09 18:41 
GeneralRe: active single instance only Pin
vtchris-peterson10-Nov-09 3:42
vtchris-peterson10-Nov-09 3:42 
QuestionHow to Avoid  in Excel while writing through C# Pin
Bharti Vermani27-Oct-09 1:19
Bharti Vermani27-Oct-09 1:19 
AnswerRe: How to Avoid  in Excel while writing through C# Pin
Gideon Engelberth27-Oct-09 3:23
Gideon Engelberth27-Oct-09 3:23 
GeneralRe: How to Avoid  in Excel while writing through C# Pin
Bharti Vermani27-Oct-09 19:18
Bharti Vermani27-Oct-09 19:18 
GeneralRe: How to Avoid  in Excel while writing through C# Pin
Bharti Vermani27-Oct-09 19:26
Bharti Vermani27-Oct-09 19:26 
GeneralRe: How to Avoid  in Excel while writing through C# Pin
bali40628-Jul-10 15:49
bali40628-Jul-10 15:49 
QuestionSQL Connection Problem Pin
Emmet_Brown27-Oct-09 0:50
Emmet_Brown27-Oct-09 0:50 
AnswerRe: SQL Connection Problem Pin
spiritboy27-Oct-09 1:01
spiritboy27-Oct-09 1:01 
GeneralRe: SQL Connection Problem Pin
J4amieC27-Oct-09 1:05
J4amieC27-Oct-09 1:05 
AnswerRe: SQL Connection Problem Pin
J4amieC27-Oct-09 1:05
J4amieC27-Oct-09 1:05 
AnswerRe: SQL Connection Problem Pin
Emmet_Brown27-Oct-09 1:13
Emmet_Brown27-Oct-09 1:13 
QuestionMy custom control can´t get out from the GroupBox it belongs... Pin
the_savage_poetry27-Oct-09 0:47
the_savage_poetry27-Oct-09 0:47 
Questionlistbox selectedvaluechanged event fires programmaticlly !!! [modified] Pin
Hussam Fattahi27-Oct-09 0:47
Hussam Fattahi27-Oct-09 0:47 
AnswerRe: listbox selectedvaluechanged event fires programmaticlly !!! Pin
Henry Minute27-Oct-09 4:58
Henry Minute27-Oct-09 4:58 
Your ListBox is behaving as designed and as far as I am aware it is not possible to stop it.

However one of the many ways to cope with the problem is as follows:

1) Modify the Constructor for your Form
private bool stillInitializing = false;    //<========== NEW CODE ===================
public MyForm()
{
    this.stillInitializing = true;    //<========== NEW CODE ===================

    InitializeComponent();

    this.stillInitializing = false;    //<========== NEW CODE ===================
}


2) Modify your event handler(s)
private void listBox1_SelectedIndexChanged(object sender, EventArgs e)
{
    if (this.stillInitializing)
    {
        return;
    }

    // your code goes here
}


Hope this helps! Smile | :)

Henry Minute

Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”

GeneralRe: listbox selectedvaluechanged event fires programmaticlly !!! Pin
Hussam Fattahi27-Oct-09 5:25
Hussam Fattahi27-Oct-09 5:25 
GeneralRe: listbox selectedvaluechanged event fires programmaticlly !!! Pin
Henry Minute27-Oct-09 5:29
Henry Minute27-Oct-09 5:29 
QuestionHow to implement a socket (IP layer) packets using C# ? Pin
3bood.ghzawi27-Oct-09 0:25
3bood.ghzawi27-Oct-09 0:25 
AnswerRe: How to implement a socket (IP layer) packets using C# ? Pin
spiritboy27-Oct-09 0:31
spiritboy27-Oct-09 0:31 
Question[Message Deleted] Pin
saurabh8april27-Oct-09 0:16
saurabh8april27-Oct-09 0:16 
AnswerRe: collapsible meanubar Pin
Philip.F27-Oct-09 0:25
Philip.F27-Oct-09 0:25 
GeneralRe: collapsible meanubar Pin
saurabh8april27-Oct-09 0:31
saurabh8april27-Oct-09 0:31 

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.