Solved

Help with selecting data from combobox using VB.NET

Posted on 2015-02-08
9
105 Views
Last Modified: 2015-02-09
Hi,
What is the first property activated when you select a row from a  combobox? I included a code to display label indicating code is processing in the selectindex property bu the label does not display when I select a row, until search code is completed.

Victor
0
Comment
Question by:vcharles
  • 5
  • 2
  • 2
9 Comments
 
LVL 3

Expert Comment

by:Shane Kahkola
ID: 40597500
I believe it's combobox.click()

Then it should be SelectedIndexChanged()
0
 

Author Comment

by:vcharles
ID: 40597590
Hi,

Problem with Click is the label appears before I select a row.

Thanks
0
 
LVL 3

Expert Comment

by:Shane Kahkola
ID: 40597648
Right, I was confirming order of events during operation.  Are you sure it's not just happening so fast you're not seeing it?
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 

Author Comment

by:vcharles
ID: 40597709
Hi,
It is happening but after the code executes for example, code  in selectindexchanged

Label1.visible = True
Code
Label1.visible  = false

Code takes about 10 seconds to complete execution, meanwhile the label to indicate code is processing does not appear, until the code completes its execution.
0
 
LVL 35

Accepted Solution

by:
Miguel Oz earned 500 total points
ID: 40597719
Your code must force the label to be refreshed in the UI. For win forms, use the Refresh method as shown below:
Label1.visible = True
Label1.Refresh()
 Code
 Label1.visible  = false

Note: Your initial code does not work because label UI changes will not be applied until the event runs all your event code. Keep in mind that windows queue all your UI events for processing.
0
 

Author Closing Comment

by:vcharles
ID: 40598015
Thank you.
0
 

Author Comment

by:vcharles
ID: 40598018
Hi,

Is there a way to show the label blinking?
Thanks,
Victor
0
 
LVL 35

Expert Comment

by:Miguel Oz
ID: 40599420
Victor:
I do not think it is feasible to do it with your current implementation. Most label blinking implementations relied on timer events.
You could open another question in case other experts may have different advice.
0
 

Author Comment

by:vcharles
ID: 40599522
Ok. Thanks.
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating an analog clock UserControl seems fairly straight forward.  It is, after all, essentially just a circle with several lines in it!  Two common approaches for rendering an analog clock typically involve either manually calculating points with…
This article shows how to deploy dynamic backgrounds to computers depending on the aspect ratio of display
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question