|
-
Oct 25th, 2017, 04:12 AM
#4
Re: Unwanted trigger of an event.
If you add your handlers in code rather than in the designer (which is where they are added if you just double click on an event in the properties window, or double click on a control to create an event), then you can control exactly when they are bound.
This means you can do your call to Fill your ComboBox and set its SelectedIndex first, then add your handler. This way it won't trigger while you loading data on form load, but it will trigger the rest of the time.
Generally i now add all my handlers in a sub that i call at the end of Form_Load after i have loaded all data so i have full control as to what event are firing when.
Please Mark your Thread "Resolved",  if the query is solved & Rate those who have helped you
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|