Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!psuvax1!psuvm!cunyvm!byuvm!byuvax!taylorj From: taylorj@yvax.byu.edu Newsgroups: comp.sys.mac.hypercard Subject: Re: Cursor in menubar Message-ID: <1679taylorj@yvax.byu.edu> Date: 19 Oct 90 03:41:21 GMT Lines: 36 In <1990Oct18.171219.29303@gpu.utcs.utoronto.ca>, gwowen@gpu.utcs.utoronto.ca (George Owen) asks if there is a way to tell if the pointer is in the menubar. There's no message sent when the mouse pointer enters (or leaves) the menubar, but you can write an idle handler to accomplish the same thing. Try this one: on idle global inMenuBar if inMenuBar is empty then -- first time through put (the mouseV + the top of card window < 20) into inMenuBar end if if the mouseV + the top of card window < 20 then if not inMenuBar then send mouseEnterMenu to this card put true into inMenuBar end if else if inMenuBar then send mouseLeaveMenu to this card put false into inMenuBar end if end if end idle This will send a message whenever the mouse enters or leaves the menubar. It only sends the message once on each entry or exit (i.e. it won't continually send the mouseEnterMenu message while the mouse is within the menubar), and it initializes itself the first time through so no spurious message is sent even if the mouse is already within the menubar. I tested this, so I know it works. Jim Taylor Microcomputer Support for Curriculum | Brigham Young University | Bitnet: taylorj@byuvax.bitnet 101 HRCB, Provo, UT 84602 | Internet: taylorj@yvax.byu.edu