[futurebasic] Re: [FB] question mark

Message: < previous - next > : Reply : Subscribe : Cleanse
Home   : October 2004 : Group Archive : Group : All Groups

From: bernie <fblist@...>
Date: Thu, 21 Oct 2004 16:06:05 +0100
On 21 Oct 2004, at 15:44, bernie wrote:

> On 21 Oct 2004, at 15:08, Alain Wrobel wrote:
>> 		- is it possible to know if a "sheet alert" window is in activity 
>> (my goal is the following : the user must be unable to activate 
>> another window before closing  the "sheet alert" window)
>
> There'll be a better way of getting the parent ref on close but I'd 
> need to look that up.

Found it:

toolbox fn GetSheetWindowParent(WindowRef inSheet, WindowRef * 
outParentWindow) = OSStatus

//
//
//

local fn HideSheetWnd(sheet as long)
dim as WindowRef @ sheetRef, parentRef
dim as OSStatus    osStatus
'~'<
get window sheet, sheetRef
OSStatus = fn GetSheetWindowParent(sheetRef, parentRef)
osStatus = fn HideSheetWindow(sheetRef)
osStatus = fn SetWindowModality(parentRef, _kWindowModalityNone, 0)
end fn