Re: Key Press to have Window "reappear ??
- Posted by Selgor Feb 23, 2011
- 1543 views
Hello Derek.
I have ALWAYS told you I am a novice in .exw programming. And probably in programming as a whole I am a sort of " let's try this & hope it works" person. Most often "it" does work for me. But when "it" doesn't I ask for EXPERT advice. I thought "we" were or are "hobbyists". As such we learn as we go .
Now , taking your code previously ... I worked on it and came up with the following programme which I thought worked O.K. until I now read your magnificent code. And I thank you and will digest it for future reference. Isn't that how we all learn ?
This programme puts a little window in the left top of the screen. When "it" is clicked the main Strip reappears. I thought this is what you were trying to get me to do. Use the code you gave and "gel" it to mine. For what it is now worth (maybe worthless) I show you MY code. At least I got something that somewhat worked ! And as usual I learnt something new in doing it.
If you do not learn something new each day then ...... shame .
Thanks for your patience as usual.
By the way my .ex Kaleidoscope programme which you helped put into .exw gui window code took nearly 2 years to perfect. See, I keep tapping away and eventually I get there.
Remember all I needed was help to "window" it NOT write the Kaleidoscope code.
But, heaps of thanks for this LESSON. I have learnt a lot.
Cheers. Selgor.
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, 0, 1) -- 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) setCtlPosition(Win,-685, -30) -- 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)