On May 26, 2005, at 9:45 AM, Ken Gish wrote:
I am using OS X Panther (10.3.9). Any example using Declares?
dim error as integer
Declare Function SetWindowAlpha Lib "CarbonLib" (inWindow as windowPtr,
inAlpha as single) as integer
error = setWindowAlpha(theWindow, 0.5)//set window to half transparent
if error <> 0 then
//there was a problem!
end if
Alpha ranges from 0.0 (transparent) to 1.0 (opaque).
Change "CarbonLib" to "Carbon" if you're compiling Mach-O
You can now do something like this in a Timer to fade between two
windows in the same place:
Sub Action()
Declare Function SetWindowAlpha Lib "CarbonLib" (inWindow as
windowPtr, inAlpha as single) as integer
call setWindowAlpha(fadeToWindow, currentAlpha)
call setWindowAlpha(fadeFromWindow, 1.0 - currentAlpha)
currentAlpha = currentAlpha + 0.1
End Sub
Although it would probably look better if you removed the window
shadows first (and turned them back on afterwards!)
To get a window's alpha, use this:
Declare Function GetWindowAlpha Lib "CarbonLib" (inWindow as windowPtr,
byref outAlpha as single) as integer
HTH!
Asher Dunn
--------------------------------------------------------
President and Head Developer of Fireye Software
<http://www.fireyesoftware.com/>
AIM and Yahoo: fireye7517
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>
|