Re: Key Press to have Window "reappear ??
- Posted by Selgor Feb 23, 2011
- 1570 views
Thanks for staying with me.
I must be doing it all wrong. Still no joy.
Here is what code now looks like.
include win32lib.ew without warning constant Win = createEx(Window,"",0,220,150,690,45,{WS_POPUP,WS_DLGFRAME},WS_EX_PALETTEWINDOW), Icn1 = create( Icon, "", Win, 5, 5, 32, 32, 0 ), Icn2 = create( Icon, "", Win, 45, 5, 32, 32, 0 ), Icn3 = create( Icon, "", Win, 85, 5, 32, 32, 0 ), Icn4 = create( Icon, "", Win, 125, 5, 32, 32, 0 ), Icn5 = create( Icon, "", Win, 165, 5, 32, 32, 0 ), Icn6 = create( Icon, "", Win, 205, 5, 32, 32, 0 ), Icn7 = create( Icon, "", Win, 245, 5, 32, 32, 0 ), Icn8 = create( Icon, "", Win, 285, 5, 32, 32, 0 ), Icn9 = create( Icon, "", Win, 325, 5, 32, 32, 0 ), Icn10 = create( Icon, "", Win, 365, 5, 32, 32, 0 ) setWindowBackColor(Win,0027110 ) setIcon( Icn1, "c:\\im\\icos\\c.ico" ) setIcon( Icn2, "c:\\im\\icos\\cd.ico" ) setIcon( Icn3, "c:\\im\\icos\\dl.ico" ) setIcon( Icn4, "c:\\im\\icos\\ed.ico" ) setIcon( Icn5, "c:\\im\\icos\\f2p.ico" ) setIcon( Icn6, "c:\\im\\icos\\pif.ico" ) setIcon( Icn7, "c:\\im\\icos\\rm.ico" ) setIcon( Icn8, "c:\\im\\icos\\ts.ico" ) setIcon( Icn9, "c:\\im\\icos\\wfe.ico" ) setIcon( Icn10, "c:\\im\\icos\\wk.ico" ) setHint( Icn1 , "Control Panel" ) setHint( Icn2 , "Check Disk" ) setHint( Icn3 , "Dir Lister" ) setHint( Icn4 , "Erase CD-DVD" ) setHint( Icn5 , "Folder 2 My PC" ) setHint( Icn6 , "PastIconFlusher" ) setHint( Icn7 , "Ram Monitor" ) setHint( Icn8 , "Tree Size" ) setHint( Icn9 , "Fonts on PC" ) setHint( Icn10 , "Win Hot Key" ) procedure run_it ( integer self, integer event, sequence parms ) if self = Win then setCtlPosition(Win, -1000, -1000) -- Hide it end if -- To reshow it, move it back to the screen. if self = Win then setCtlPosition(Win, 220, 150) -- Display it end if ------->>>>>>> for i = 1 to 1000000000 do end for << works ------->>>>>>> setVisible(Win,1) << but !! -- if self = Win then -- closeWindow(Win) closeApp() -- end if if self = Icn1 then shellExecute ("open","c:\\windows\\system32\\control.exe",SW_SHOWNORMAL) closeWindow(Win) closeApp() end if if self = Icn2 then shellExecute ("open","c:\\checkdisk\\checkDisk.exe",SW_SHOWNORMAL) closeWindow(Win) closeApp() end if if self = Icn3 then shellExecute ("open","C:\\Program Files\\Directory Lister\\DirLister.exe",SW_SHOWNORMAL) closeWindow(Win) closeApp() end if end procedure setHandler({Win,Icn1,Icn2,Icn3}, w32HClick, routine_id("run_it")) WinMain(Win, Normal)