Double-Click to open a form causes it to lose focus...

W

WATYF

Hi there... I've got a systray app that uses a notify icon with a
context menu to open various forms. Here's my problem. If I right-click
on the icon, and select an option from the menu, the corresponding form
will open AND it will have to focus. But, if I double-click on the
icon, the default form will open, but it will NOT have the focus.

The default form is chosen by the user, and it's basically just one of
the forms available to them in the context menu. (allowing them to open
one of the options from the menu without having to right-click). The
code used to open the form, whether it be by right-clicking and
selecting from the menu, or by double-clicking, is the SAME code... so
why does the form not get the focus when double-clicking?

I've tried a number of things to remedy this, none of which worked. I
tried adding Form.Focus calls in the procedure that opens the form as
well as in the procedure on the notify icon (and a few other places).
No matter what I do, the form will not accept the focus when I open it
by double-clicking. Is there a way to force the form to accept the
focus?



WATYF
 
W

WATYF

ah crap... nevermind... I just had to use "Activate" instead of
"Focus". For the record, though... that's still an annoying behavior.
:blush:p


WATYF
 

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

Top