ComboBox: Value before SelectedIndexChanged occured

  • Thread starter Thread starter Anson
  • Start date Start date
A

Anson

Dear all,

This questions seems simple to most of you, but I just couldn't figure it
out.

I have a combobox. I want to capture the value (or index) of the combo box
just **before** the user click on the box and change the value.

I know I can use a flag to remember this value. But is there any better way
to do it?

Your help will be greatly appreciated.

Anson
 
Anson said:
I have a combobox. I want to capture the value (or index) of the combo box
just **before** the user click on the box and change the value.

I know I can use a flag to remember this value. But is there
any better way to do it?

I like the way of storing the previous selected index in a variable and then
check this variable.
 
Thank you.

I guess this is the only way. Cuz i remember that in MFC, there is an event
called something like "Changing". But i guess there is no such event in VB.
 
Anson said:
Dear all,

This questions seems simple to most of you, but I just couldn't figure it
out.

I have a combobox. I want to capture the value (or index) of the combo box
just **before** the user click on the box and change the value.

I know I can use a flag to remember this value. But is there any better way
to do it?

Your help will be greatly appreciated.

Anson
Maybe store the last value in the .tag? Then when the
SelectedIndexChanged you can do whatever checks you need and then store
the new value again in the .tag.

Rinze
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top