[futurebasic] Re: [FB] FB^3 Menu Bar

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : November 1999 : Group Archive : Group : All Groups

From: Chris Stasny <staz@...>
Date: Tue, 23 Nov 1999 08:31:50 -0600
>I have tried the Hide Menu Bar example that comes with FB^3 and it does not
>hide the menu bar on my imac or my G3.  It does mess up the screen area so
>windows can be dragged into the menu bar area and the bottom of the screen is
>also affected. Anybody know what might be wrong with it.  Does it work on
>anybodys mac?
>
>David


Try this...


/*
      These routines are available with Mac OS 8.5 or later
      (Thanks to Derek Smith for this code)
*/

#if cpuPPC
library "MenusLib"
toolbox fn IsMenuBarVisible = Boolean
toolbox ShowMenuBar
toolbox HideMenuBar
library
#endif

begin globals
dim gMenuBarHt
end globals

gMenuBarHt = {_mbarheight}
menu 1,0,1,"File"
menu 1,1,1,"Quit/Q"

window 1

Long if system(_sysVers) < 850
print "Sorry. This requires system 8.5 or higher"
beep : delay 1000 : end
xelse
end if

local fn checkMenuBar
dim @my,mx
call getmouse(my)
call localtoglobal(my)
long if my < gMenuBarHt
long if fn IsMenuBarVisible = _false
call ShowMenuBar
end if
xelse
long if fn IsMenuBarVisible
call HideMenuBar
end if
end if
end fn

print "Move the mouse over the menu bar to make it appear"

do
handleevents
fn checkMenuBar
until 0

Best,

-STAZ    ~)~

http://www.stazsoftware.com  mailto:staz@...
Orders: 800-348-2623         Tech: 228-255-7085
    FAX: 228-255-7086