Re: Interesting --- VK_ESCAPE used to work --- Only one that now does VK_ENTER ??

new topic     » goto parent     » topic index » view thread      » older message » newer message

Derek. This is the programme that you gave me . Written from my "rubbish" stuff. It now only works with ENTER on all my machines.

include win32lib.ew 
without warning 
   
constant  Win  = createEx(Window, "", 0, -1000,-1000, 690, 245, 
                             {WS_POPUP, WS_DLGFRAME},   
                             WS_EX_PALETTEWINDOW)  
integer x  
sequence IconId  
IconId = {}  
  
sequence command_data  
command_data =   
  {  
    {"c:\\windows\\system32\\control.exe", "c:\\im\\icos\\c.ico" , "Control Panel"},  
    {"c:\\checkdisk\\checkDisk.exe", "c:\\im\\icos\\cd.ico", "Check Disk"},  
    {"c:\\Program Files\\Directory Lister\\DirLister.exe", "c:\\im\\icos\\dl.ico", "Dir Lister"},  
    {"c:\\Program Files\\SRWare Iron\\iron.exe", "c:\\im\\icos\\iron.ico", "Iron"}, 
    { "", "c:\\im\\icos\\f2p.ico", "Folder 2 My PC"},  
    { "", "c:\\im\\icos\\pif.ico", "PastIconFlusher"},  
    { "", "c:\\im\\icos\\rm.ico", "Ram Monitor"},  
    { "", "c:\\im\\icos\\ts.ico", "Tree Size"},  
    { "", "c:\\im\\icos\\wfe.ico", "Fonts on PC"},  
    { "", "c:\\im\\icos\\wk.ico", "Win Hot Key"}  
  }  
   
setWindowBackColor(Win, 0027110 )   
  
x = 5 -- The X position of leftmost icon.  
for i = 1 to length(command_data) do  
    IconId &= create( Icon, "", Win, x, 5, 32, 32, 0)  
    x += 40  
    setIcon( IconId[$], command_data[i][2])  
    setHint( IconId[$], command_data[i][3])  
end for  
  
procedure WinKey(integer self, integer event, sequence parms)   
    -- Check for key presses.   
    if parms[1] = VK_ESCAPE then   
        setCtlPosition(Win, 125, 150) -- Show it 
    end if   
end procedure    
setHandler( Screen , w32HKeyDown, routine_id("WinKey"))   
   
procedure hide_window ( integer self, integer event, sequence parms )   
    setCtlPosition(Win, -1000, -1000) -- Hide it  
end procedure  
setHandler(Win, w32HClick, routine_id("hide_window"))   
  
procedure run_it ( integer self, integer event, sequence parms )   
  
    integer cmd  
  
    cmd = find(self, IconId)  
   
    if cmd != 0 and length(command_data[cmd][1]) > 0 then   
        shellExecute ("open", command_data[cmd][1], SW_SHOWNORMAL)   
        setCtlPosition(Win, -1000, -1000) -- Hide it 
       -- closeApp() 
    end if  
   
end procedure 
setHandler(IconId, w32HClick, routine_id("run_it")) 
   
WinMain(Win, Normal) 
 

And This is the programme that has been working . It has not been added to for weeks. And was working with ESCAPE. Now will only work with ENTER on all machines.

include win32lib.ew 
without warning 
 ------------------------------------  Note 2 colours !!!! 
constant 
 Win  = createEx(Window, "", 0, 100, 100, 208, 245,           ---------- were -1000 not 100 
                             {WS_POPUP, WS_DLGFRAME}, 
                             WS_EX_PALETTEWINDOW) 
  setWindowBackColor(Win, Yellow)--0027110 ) 
 
constant 
 
LText1 = createEx( LText, "   These Use All The Time ", 
                        Win, 0, 0, 1070, 20, 0, 0 ) , 
LText2 = createEx( LText, "   These Below R Internet ", 
                        Win, 0, 95, 1070, 20, 0, 0 ), 
LText3 = createEx( LText, "   List      Fold      Icon     Tree",Win, 0, 65, 1070, 15, 0, 0 ), 
 
LText4 = createEx( LText, "   Iron     Moon   Goog    Form    ESyt", 
          Win, 0, 158, 1070, 15, 0, 0 ) 
 
setFont(LText1,"Times Roman",12,Italic+Bold) 
setFont(LText2,"Times Roman",12,Italic+Bold) 
setFont(LText3,"Times Roman", 9,       Bold) 
setFont(LText4,"Times Roman", 9,       Bold) 
integer x, x1 
sequence IconId , IconId1 
IconId  = {} 
IconId1 = {} 
 
sequence command_data   , command_data1 
command_data = 
  { 
    {"c:\\Program Files\\Directory Lister\\DirLister.exe", "c:\\im\\icos\\dl.ico", "Dir Lister"}, 
    {"c:\\Program Files\\Folder2MyPC\\Folder2MyPC.exe", "c:\\im\\icos\\f2p.ico", "Folder 2 My PC"}, 
    {"c:\\PastIconsFlusher\\PastIconsFlusher.exe", "c:\\im\\icos\\252.ico", "PastIconFlusher"}, 
    {"c:\\Program Files\\JAM Software\\TreeSize Free\\TreeSizeFree.exe", "c:\\im\\icos\\ts.ico", "Tree Size"} 
 
 
  } 
 
command_data1 = 
 { {"c:\\Program Files\\SRWare Iron\\iron.exe", "c:\\im\\icos\\iron.ico", "Iron"}, 
   {"C:\\Program Files\\Palemoon-Portable-3.6.13\\Palemoon-Portable.exe", 
                     "c:\\im\\icos\\moon.ico", "moon"}, 
   {"C:\\Documents and Settings\\Administrator\\Local Settings\\Application Data\\Google\\Chrome\\Application\\chrome.exe", 
                      "c:\\im\\icos\\goog.ico", "goog"}, 
   {"http://openeuphoria.org/forum/index.wc", "c:\\im\\icos\\goos.ico", "forum"}, 
   {"http://www.rapideuphoria.com", "c:\\im\\icos\\ss1.ico", "Site"} 
   } 
 
 
setWindowBackColor(Win, 0027110 ) 
 
 
x = 5 -- The X position of leftmost icon. 
for i = 1 to length(command_data) do 
    IconId &= create( Icon, "", Win, x, 25, 32, 32, 0) 
    x += 40 
    setIcon( IconId[$], command_data[i][2]) 
    setHint( IconId[$], command_data[i][3]) 
end for 
 
x1=5 
for i = 1 to length(command_data1) do 
    IconId1 &= create( Icon, "", Win, x1, 120, 32, 32, 0) 
    x1 += 40 
    setIcon( IconId1[$], command_data1[i][2]) 
    setHint( IconId1[$], command_data1[i][3]) 
end for 
 
procedure WinKey(integer self, integer event, sequence parms) 
    -- Check for key presses. 
    if parms[1] = VK_ESCAPE then 
        setCtlPosition(Win, 525, 150) -- Show it 
    end if 
end procedure 
setHandler( Screen , w32HKeyDown, routine_id("WinKey")) 
 
procedure close_the_app_and_window ( integer self, integer event, sequence parms ) 
--  setCtlPosition(Win, -1000, -1000) -- Hide it 
    if self = Win then 
        closeApp()  
    end if 
end procedure 
setHandler(Win, w32HClick, routine_id("close_the_app_and_window")) 
 
procedure run_it ( integer self, integer event, sequence parms ) 
    integer cmd 
    cmd = find(self, IconId) 
 
    if cmd != 0 and length(command_data[cmd][1]) > 0 then 
        shellExecute ("open", command_data[cmd][1], SW_SHOWNORMAL) 
        setCtlPosition(Win, -1000, -1000) -- Hide it 
       -- closeApp() 
    end if 
end procedure 
setHandler(IconId, w32HClick, routine_id("run_it")) 
 
procedure run_it1 ( integer self, integer event, sequence parms ) 
    integer  cmd1 
    cmd1 = find(self, IconId1) 
 
     if cmd1 != 0 and length(command_data1[cmd1][1]) > 0 then 
        shellExecute ("open", command_data1[cmd1][1], SW_SHOWNORMAL) 
        setCtlPosition(Win, -1000, -1000) -- Hide it 
       -- closeApp() 
    end if 
end procedure 
setHandler(IconId1, w32HClick, routine_id("run_it1")) 
 
procedure Win_onActivate (integer self, integer event, sequence params) 
                      --params is () 
  setVisible(LText1,1) 
  setVisible(LText2,1) 
  setVisible(LText3,1) 
  setVisible(LText4,1) 
end procedure 
setHandler( Win, w32HActivate, routine_id("Win_onActivate")) 
WinMain(Win, Normal) 
 
------ 2 do in new strip 
-- {"c:\\windows\\system32\\control.exe", "c:\\im\\icos\\c.ico" , "Control Panel"}, 
 

That is all that I can tell you.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu