Link to home
Start Free TrialLog in
Avatar of sny23vpb
sny23vpb

asked on

Combo Box Event Firing at Load

I have an application such that it has a combo box and when the form is up and loaded; I'd like to call another form when they select an item in the combo box.

I've tried putting the following code in various events (its currently in selectedvaluechange) but no matter where I put it; vb.net opens the form when it first loads without anyone even having an opportunity to see the combo box on the screen much less click on it.

Should I be using a diff event or different code.

Under selectedvaluechange I have

  If cboDiscounts.Text Like "*system.data.datarowview*" Or System.Convert.IsDBNull(cboDiscounts.Text) = True Then

        Else

            discountentry.ShowDialog()
        End If

Basically; by using if system.data.datarowview which I'm not even sure you can use in an expression or isdbnull; I'm trying to tell it that while the form is still loading and the text in the comboxbox is blank; do nothing. Wait for the combo to load and let the user click something then open the form.

No success. yet.
Thanks for anyones help with this !
ASKER CERTIFIED SOLUTION
Avatar of Sancler
Sancler

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of sny23vpb
sny23vpb

ASKER

what event would you put the loading=false in ?  I tried at the end of initializecomponent I tried at the end of finalize ; but no luck.

Thanks again.
Form_Load or Form_Activated, assuming that your combobox is fully loaded with values, or bound to a datasource that is fully loaded with values, at that point.

Roger
are using windows application or web application??
windows application in visual studio 2003.  Perhaps I'm not looking in the right place. I only see the events for   new, finalize, and initialize component.  I don't see a form load event. Thanks for your help.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you