1. Is there a mouse over image event in Euphoria to generate a menu ?

Hello,

Just wondering if Euphoria has a ....

mouse over image .

or mouse hover .

[ not the hov.exw or hover.exw in win32 lib ] .

or some similar code to generate a menu list.

One that does not require a mouse click ??

Cheers,

Selgor

new topic     » topic index » view message » categorize

2. Re: Is there a mouse over image event in Euphoria to generate a menu ?

Selgor said...

Hello,

Just wondering if Euphoria has a ....

mouse over image .

or mouse hover .

[ not the hov.exw or hover.exw in win32 lib ] .

or some similar code to generate a menu list.

One that does not require a mouse click ??

I assume you are only talking about the Windows platform.

Describe what you would like to happen in step form ... I'm having trouble picturing what it is you are after.

Are you wanting the user to move the mouse to a specific spot on your window, which causes your application display a menu list from which the user picks an item. And then the menu list disappears.

Why is the code in the win32lib demos not suitable? They seem to show one how to detect mouse movements etc ...

Win32lib also has a concept called a 'mouse trap', which is an area of your screen your define and when the mouse point moves into that area, a w32HMouseTrap event is triggered. During that event you could launch another win32lib control called a popup-menu.

new topic     » goto parent     » topic index » view message » categorize

3. Re: Is there a mouse over image event in Euphoria to generate a menu ?

Hello Derek,

Steps....

1. Image placed on Desktop.

2. Mouse moves, hovers over image.

3. Popup Menu with items .

4. Click to execute an item.

BUT there is NO click to pop the menu. Just mouse over image.

BarNone, LaunchIt, EnchantedToolbar are programmes that can do it.

Just thought it might be a bonus if a Euphoria programme could do it.

The following is a "hack" of hov or hover from win32Lib.

It produces a "programme" that I wrote.

Not once but twice, three times if you are slow with the the mouse. !

But it places a WINDOW on desktop.

Image would be better.

Well, that is what I am trying to do.

Do you follow ??

Any help, appreciated.

Cheers,

Selgor.

 
without warning 
include win32lib.ew 
 
integer w, img 
integer bstate 
sequence bm, bsize 
 
w = create(Window, "", 0, 0, 0, 20, 80, 0) 
VOID = setSearchPaths("..\\demoresources\\") 
bstate = 0 
bm = {loadBitmapFromFile("happy.bmp"), 
      loadBitmapFromFile("21.bmp")} 
 
bsize = {getSize(bm[1]), getSize(bm[2])} 
 
img = create(Bitmap, "", w, 10, 10, 40, 40, 0) 
 
procedure w_Activate(integer self, integer event, sequence params) 
    bstate = 1 
    setBitmap(img, bm[bstate]) 
end procedure 
 
procedure w_Mouse(integer self, integer event, sequence params) 
    integer x,y 
    integer newstate 
 
 
    x = params[2] 
    y = params[3] 
 
    if (x < 1 or x > bsize[bstate][3]+1) or     ---was 20  then 10  then 5 
       (y < 1 or y > bsize[bstate][4]+1) then   ---was 20  then 10  then 5 
        newstate = 1 
  --  if (x < 1 or x > bsize[bstate][3]+1) or     ---was 20  then 10  then 5 
    --   (y < 1 or y > bsize[bstate][4]+1) then   ---was 20  then 10  then 5 
      --  newstate = 1 
    else 
        newstate = 2 
        shellExecute( "open", "C:\\EUPHORIA\\Win32LIB6006\\Demo\\EuLornch.exw", SW_SHOWNORMAL ) 
    end if 
 
    if newstate = bstate then 
 
        return 
    end if 
 
    setBitmap(img, bm[newstate]) 
    bstate = newstate 
    --shellExecute( "open", "C:\\EUPHORIA\\Win32LIB6006\\Demo\\Drives.exw", SW_SHOWNORMAL ) 
end procedure 
 
setHandler(w, w32HActivate, routine_id("w_Activate")) 
setHandler(w, w32HMouse,    routine_id("w_Mouse")) 
 
WinMain(w, Normal) 
 
new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu