[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 175
  • Last Modified:

Un focus

Hi.

Is there a way to unfocus my form with the press of a button ?
0
CodedK
Asked:
CodedK
  • 3
  • 2
1 Solution
 
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

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now