Re: How to make a Window manager?
- Posted by "Thomas Parslow (PatRat)" <patrat at rat-software.com> Sep 06, 2001
- 425 views
> Is there any way to write an app that will let me minimize/maximize > other windows, preferably an arbitrary number of them with a single > button click? Hi, Try this, you'll need my window finding functions from: http://www.rat-software.com/projects.html -----code starts------ without warning include window.ew constant USER32 = open_dll("user32.dll") constant dllShowWindow = define_c_proc(USER32, "ShowWindow", {C_POINTER, C_INT}) constant SW_HIDE = 0, SW_SHOWNORMAL = 1, SW_NORMAL = 1, SW_SHOWMINIMIZED = 2, SW_SHOWMAXIMIZED = 3, SW_MAXIMIZE = 3, SW_SHOWNOACTIVATE = 4, SW_SHOW = 5, SW_MINIMIZE = 6, SW_SHOWMINNOACTIVE = 7, SW_SHOWNA = 8, SW_RESTORE = 9, SW_SHOWDEFAULT = 10, SW_MAX = 10 object window,junk puts(1,"Enter a window to minimize (wildcards alowed): ") window = gets(0) window = window[1..length(window)-1] c_proc(dllShowWindow,{window_GetHwnd(window),SW_MINIMIZE}) puts(1,"\nPress any key to maximize window\n") junk = gets(0) c_proc(dllShowWindow,{window_GetHwnd(window),SW_MAXIMIZE}) puts(1,"Press any key to restore window\n") junk = gets(0) c_proc(dllShowWindow,{window_GetHwnd(window),SW_RESTORE}) -----code ends------ Thomas Parslow (PatRat) ICQ #:26359483 Rat Software http://www.rat-software.com/ Please leave quoted text in place when replying