` Comment on an Icetips Article
Icetips - Templates, Tools & Utilities for Clarion Developers

Templates, Tools and Utilities
for Clarion Developers

Add a comment to an Icetips Article

Please add your comments to this article. Please note that you must provide both a name and a valid email address in order for us to publish your comment. Comments are moderated and are not visible until they have been approved. Spam is never approved!

Your Name:  
Email:  
Header text/Subject:  

Please enter your comment in the box below:

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 December 3, 2024, 12:08 pm
This article has been viewed 35270 times.



Back to article list   Search Articles   Add Comment   Printer friendly

Login

User Name:

Password: