Avatar of sibliege
sibliegeFlag for Belgium

asked on 

Detect state of a windows that has been hidden thrue SW_HIDE?

Hi!
I have writed a code to Show/Hide a specific external Program.
I have also made a keyboard shortcut to directly hide or show the program.
But to switch between hide and show I need to get the state of my external window program.

Based on code after, How can I know if hwndWinamp is hidden or showed???

Thanks,
var GGHandle : THandle;
classname: array[0..255] of char;
var hwndWinamp : THandle;
begin
GGHandle := FindWindow(nil,'External Appz');
GetClassName(GGHandle,ClassName,SizeOf(ClassName));
hwndWinamp := FindWindow(classname,nil);
ShowWindow(hwndWinamp, SW_SHOW);
or
ShowWindow(hwndWinamp, SW_HIDE);

Open in new window

Editors IDEs

Avatar of undefined
Last Comment
sibliege
ASKER CERTIFIED SOLUTION
Avatar of Lukasz Zielinski
Lukasz Zielinski
Flag of Poland image

Blurred text
THIS SOLUTION IS ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Avatar of sibliege
sibliege
Flag of Belgium image

ASKER

Right!

Ok with this code

    if IsWindowVisible(hwndWinamp)=true then
    begin
     FRM_Main.BT_Hide.Click;
    end else
    begin
     FRM_Main.BT_Show.Click;
    end;
Editors IDEs
Editors IDEs

Development in most programming languages is frequently done with an editor or integrated development environment (IDE). An IDE is a software application that provide comprehensive facilities to computer programmers for software development. An IDE normally consists of a source code editor, build automation tools and a debugger. XCode, Visual Studio, Adobe Dreamweaver and Eclipse are some of the more popular development tools, but an editor or IDE can be anything from simple text editors to sophisticated programs. Related topics: All programming and development language, database and web based content management systems topics

25K
Questions
--
Followers
--
Top Experts
Get a personalized solution from industry experts
Ask the experts
Read over 600 more reviews

TRUSTED BY

IBM logoIntel logoMicrosoft logoUbisoft logoSAP logo
Qualcomm logoCitrix Systems logoWorkday logoErnst & Young logo
High performer badgeUsers love us badge
LinkedIn logoFacebook logoX logoInstagram logoTikTok logoYouTube logo