Lazarus
Home
Help
TinyPortal
Search
Login
Register
Lazarus
»
Forum
»
Programming
»
General
»
GetForegroundWindow and other
Free Pascal
Website
Downloads
Wiki
Documentation
Bugtracker
Mailing List
Lazarus
Website
Downloads (Laz+FPC)
Packages (OPM)
FAQ
Wiki
Documentation (RTL/FCL/LCL)
Bugtracker
CCR Bugs
GIT
Mailing List
Other languages
Foundation
Website
Useful Wiki Links
Project Roadmap
Getting the Source
Screenshots
How to use the forum
Forum Rules
About donations (wiki)
Bookstore
Computer Math and Games in Pascal
(preview)
Lazarus Handbook
« previous
next »
Print
Pages: [
1
]
Author
Topic: GetForegroundWindow and other (Read 5611 times)
xinyiman
Hero Member
Posts: 2264
GetForegroundWindow and other
«
on:
April 28, 2011, 02:15:16 pm »
Hello I am creating a program that uses GetForegroundWindow to figure out which window I'm currently using in an external program. But I also understand how I can compare it with the handle of my program. To prevent the two programs do not coincide. Does anyone have an idea?!
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
Shebuka
Sr. Member
Posts: 429
Re: GetForegroundWindow and other
«
Reply #1 on:
April 28, 2011, 02:37:45 pm »
Compare GetForegroundWindow with MainForm.Handle, both are integers.
btw i don't understand well your question...
Logged
xinyiman
Hero Member
Posts: 2264
Re: GetForegroundWindow and other
«
Reply #2 on:
April 28, 2011, 02:42:02 pm »
Traveled road, but I SigSev returns error.
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
xinyiman
Hero Member
Posts: 2264
Re: GetForegroundWindow and other
«
Reply #3 on:
April 28, 2011, 02:45:27 pm »
Or rather, on the main form as you said it works, but if I want to also identify the handle of a window invoked from the main window gives me the error sigsav.
Logged
Win10, Ubuntu and Mac
Lazarus: 2.1.0
FPC: 3.3.1
Print
Pages: [
1
]
« previous
next »
Lazarus
»
Forum
»
Programming
»
General
»
GetForegroundWindow and other
TinyPortal
© 2005-2018