initWithContentRect: [ [ NSScreen mainScreen ] frame ]
                styleMask: NSBorderlessWindowMask backing: NSBackingStoreBuffered defer: YES ]




- (void)showCustomDialog: (NSWindow *)window

// User has asked to see the dialog. Display it.

{

    if (!myCustomDialog)

        [NSBundle loadNibNamed: @"MyCustomDialog" owner: self];

 

    [NSApp beginSheet: myCustomDialog

            modalForWindow: window

            modalDelegate: nil

            didEndSelector: nil

            contextInfo: nil];

    [NSApp runModalForWindow: myCustomDialog];

    // Dialog is up here.

    [NSApp endSheet: myCustomDialog];

    [myCustomDialog orderOut: self];

};
