473,320 Members | 1,828 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

listBox1_SelectedIndexChanged

Kun
Dear all,

Can we avoid listBox1_SelectedIndexChanged from fire?

My problem is during form load I fill listbox with employee name.

In listBox1_SelectedIndexChanged event detail information of the employee
will fill in bind to other textbox.

I think when form load the listBox1_SelectedIndexChanged event might fired
automatically, am I right?
If so how can I avoid it from fire auto when form loading.

Regards,
Kun
Nov 15 '05 #1
1 3897
Hi,
Use a Boolean class variable IsFill and set it to true initially, in the
listBox1_SelectedIndexChanged event if the flag is true just exit

If Not IsFill Then
'do the required stuff
End If
Cheers
Benny

Kun wrote:
Dear all,

Can we avoid listBox1_SelectedIndexChanged from fire?

My problem is during form load I fill listbox with employee name.

In listBox1_SelectedIndexChanged event detail information of the employee
will fill in bind to other textbox.

I think when form load the listBox1_SelectedIndexChanged event might fired
automatically, am I right?
If so how can I avoid it from fire auto when form loading.

Regards,
Kun


Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: news | last post by:
Not really sure if this is a javascript problem or C# - sorry if in wrong place. Modal Forms Question in Web Application I have two web forms: Form1 and Form2 Form1 calls Form2 using...
0
by: L.Peter | last post by:
Dear Group, I am doing Drag and Drop function and see this problem if I select 3 from listBox1 and drag to listBox2, the value in listBox1 is not updated, even I move (or use up and down keyboard)...
7
by: GTi | last post by:
In Win32 I have a function that opens several Dialogs and put the window handle in a listbox (together with a string): HWND hWnd = CreateDialogParam(...) LB_SETITEMDATA, index, (LPARAM)hWnd); ...
1
by: Daniel | last post by:
hi, I had an asp:listbox, and everytime i click item inside, the bar automatically go to the top, is there any way to keep the scroll position? I turn on the smartNavigation, it still doesn't...
5
by: Niggy | last post by:
I think I'm missing an execute command here. Please help. Private Sub ListBox1_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles...
6
by: rodchar | last post by:
Hey all, I was wondering if I wanted to run the listbox1_SelectedIndexChanged by calling it in my code(without actually clicking on the screen), how can I do this? thanks, rodchar
5
by: Dave | last post by:
Hi All, I have a windows form that contains 2 listboxes and 2 buttons. The listbox on the right is populated by a database routine (This is the easy part). The listbox on the left is populated...
4
by: Shimna Thomas | last post by:
I am trying to redirect to a new page aftr selecting an item in a list box. There is a button n only aftr clicking the button , the listbox is visible.Then the item is selected.Can anybody help me...
5
by: hmkaddoura | last post by:
Hi all, I have a question... I'm creating tabs programmatically using vb.net . in each tab that is created there is listbox, and 4buttons (also added by coding). when i change the listbox...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.