Un focus

Hi.

Is there a way to unfocus my form with the press of a button ?
LVL 16
CodedKAsked:
Who is Participating?
 
mokuleCommented:
Try
  SetActiveWindow(0);

is it what You need?
0
 
CodedKAuthor Commented:
Well it is what i asked, unfortunately it isnt what i need .... :/

Thanks.
0
 
mokuleCommented:
So what do You need?
0
 
CodedKAuthor Commented:
OnButtonClick there is a popup message that is unfocused. I thought that if i remove focus from
my form before the popup occur the popup window will have focus... but this doesnt work.

I used it like this :

OnButtonClick
SetActiveWindow(0)
PopupMessage
SetActiveWindow(0)

Not only the popup didnt gain focus but i have to call redraw for the form.
0
 
CodedKAuthor Commented:
I cant use SetForeGrounwindow for the popup since it is a dialog and doesnt have any handle.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.