Combobox doesn't work if the form has TopMost = true

  • Thread starter Thread starter brianushman
  • Start date Start date
B

brianushman

If I have a combobox on a form and that form's property TopMost is set
to true, the comboxbox doesn't work. I'll click on the combobox and
it won't drop down, even though all the properties for the combobox
are correct. If I change TopMost = false, then the combobox works.
Can anyone explain why this is and how I can possibly fix it? Thank
you much!
 
Hm, can you paste the necessary part of your form code (including designer
code) to reproduce the issue?

There is no reason I can think of why the dropdown will not show.
 
A combobox opens by displaying a listbox marked topmost so it appears on top
of your form. If your form is also topmost then the listbox won't
necessarily stay above your form. Are you doing anything in a timer or a
cross-thread invoke that would put your form to the front?
 
If I have a combobox on a form and that form's property TopMost is set
to true

Why? How life-or-death critical is this application? If the answer is "not
at all," then using TopMost is just an abuse of the property.
 
Why? How life-or-death critical is this application? If the answer is "not
at all," then using TopMost is just an abuse of the property.

Argh, I sent that too quickly. I meant to add that if you need this form to
stay above all other forms IN YOUR APPLICATION, then there are better ways
of going about it than setting TopMost.

Making a form stay above all other windows in the entire system is usually
the result of developer rudeness, arrogance, or ignorance as opposed to
necessity.
 
Jeff Johnson skrev:
Argh, I sent that too quickly. I meant to add that if you need this form to
stay above all other forms IN YOUR APPLICATION, then there are better ways
of going about it than setting TopMost.

Making a form stay above all other windows in the entire system is usually
the result of developer rudeness, arrogance, or ignorance as opposed to
necessity.
Agree, I hate such applications, and even worse is the applications that
steals focus and worst of all move your mouse position to focus on the
application.

May be in the last century people was just doing one ting at the same
time on the computer.
 
Back
Top