` Minimize window in another app (Ville Vahtera ) - Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Icetips Article

Back to article list   Search Articles     Add Comment     Printer friendly     Direct link  

Par2: Minimize window in another app
2006-02-02 -- Ville Vahtera
 
Program Map Module('WinApi') FindWindowA(Ulong,Ulong),Long,Pascal,Raw SendMessageA(Unsigned,Unsigned,Long,Long),Long,Raw,Pascal ShowWindow(Unsigned,Signed),Signed,Pascal,Proc End End WM_SYSCOMMAND Equate(0112h) SC_MINIMIZE Equate(0F020h) HWND Unsigned WindowTitle Cstring('Click-N-Type') Window WINDOW('test'),AT(,,151,33),CENTER,SYSTEM,GRAY BUTTON('MINIMIZE'),AT(5,11,45,14),USE(?minimize_it) BUTTON('HIDE'),AT(53,11,45,14),USE(?hide_it) BUTTON('RESTORE'),AT(101,11,45,14),USE(?show_it) END Code Open(Window) HWND = FindWindowA(0,Address(WindowTitle)) If HWND 0{prop:text} = 'handle is: ' & HWND End Accept Case Event() Of Event:Accepted Case Field() Of ?minimize_it ! Minimize the window x# = SendMessageA(HWND, WM_SYSCOMMAND, SC_MINIMIZE, 0) Of ?hide_it ! Hide the window ShowWindow(HWND,0) ! Hide the window Of ?show_it ShowWindow(HWND,1) End End End


Today is November 21, 2024, 3:33 am
This article has been viewed 35258 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: