Deactivating a form...
-
Hello experts, An application I'm currently developing pops-up reminder windows. Being a popup window, it should not "steal" the focus, as it can be unpleasent to the user if he's in the middle of something. I've tried overriding the
ShowWithoutActivation
property and returningtrue
, but the form still gets focused. My guess is that aLinkLabel
control I have on the form is receiving focus, thus having the form receive focus even when theShowWithoutActivation
property has returnedtrue
. How can I deactivate the form? Thanks in advance, Shy. -
Hello experts, An application I'm currently developing pops-up reminder windows. Being a popup window, it should not "steal" the focus, as it can be unpleasent to the user if he's in the middle of something. I've tried overriding the
ShowWithoutActivation
property and returningtrue
, but the form still gets focused. My guess is that aLinkLabel
control I have on the form is receiving focus, thus having the form receive focus even when theShowWithoutActivation
property has returnedtrue
. How can I deactivate the form? Thanks in advance, Shy.Have you tried just using the
Hide
method?"The clue train passed his station without stopping." - John Simmons / outlaw programmer
-
Hello experts, An application I'm currently developing pops-up reminder windows. Being a popup window, it should not "steal" the focus, as it can be unpleasent to the user if he's in the middle of something. I've tried overriding the
ShowWithoutActivation
property and returningtrue
, but the form still gets focused. My guess is that aLinkLabel
control I have on the form is receiving focus, thus having the form receive focus even when theShowWithoutActivation
property has returnedtrue
. How can I deactivate the form? Thanks in advance, Shy.Maybe you're using ShowDialog instead of simply show...
-
Maybe you're using ShowDialog instead of simply show...
-
Have you tried just using the
Hide
method?"The clue train passed his station without stopping." - John Simmons / outlaw programmer
-
Hello experts, An application I'm currently developing pops-up reminder windows. Being a popup window, it should not "steal" the focus, as it can be unpleasent to the user if he's in the middle of something. I've tried overriding the
ShowWithoutActivation
property and returningtrue
, but the form still gets focused. My guess is that aLinkLabel
control I have on the form is receiving focus, thus having the form receive focus even when theShowWithoutActivation
property has returnedtrue
. How can I deactivate the form? Thanks in advance, Shy. -
Maybe you're using ShowDialog instead of simply show...
Ok. Why you don't try to pass the parent form to the constructor of the new modal form and then call the
Activate
method when the new form is shown? An alternative is when you call show, a line below return the focus to any control of the form. If the previous alternative don't like you try to save the ActiveControl before open in a var and after open the new form, in the Show next line call var.Focus(). Try any of this three alternative. -
Problem solved! It appears that because I set
TopMost
totrue
, theShowWithoutActivation
property became useless. When I used theTopLevel
property instead, it worked. Regards, Shy.Good for you. I was going to mention the setting of
TopMost
, but you figured it out before I got up this morning :)"The clue train passed his station without stopping." - John Simmons / outlaw programmer