Re: full screen
Re: full screen
- Subject: Re: full screen
- From: Rhon Fitzwater <email@hidden>
- Date: Mon, 12 Aug 2002 09:25:27 -0400
I think after reading the code, that I don't quite want to use "full
screen" what I basically want to do is stop the users from clicking
outside of the main window of my program. My program is only a small
window that takes up about 1/5 of the screen. So users can still see
the dock, desktop, and all the icons on it. The hard drive is one icon
i dont want them to see or be able to click. I want to lock them out
of the backround until they quit my application. So the user can't
open anything in the dock, or can't browse the hard drive with the
finder, etc. etc. Does this sound possible?
Thanks.
-Rhon
PS: If anyone has anymore info on the full screen obj-c code that I
can add or how to add it to an AS-S program, let me know that also.
Thanks again.
On Sunday, August 11, 2002, at 04:23 PM, Stefano Tripi wrote:
Message: 1
Date: Sat, 3 Aug 2002 19:51:08 -0400
Subject: full screen
From: Rhon Fitzwater <email@hidden>
To: email@hidden, email@hidden
How can I get my app to run with full screen. I want it so the user
cannot change applications until they quit mine. I want mine to have
full control. It is a login app that has to be run before others can.
Any help would be great. Thanks.
-Rhon
P.S: I am using the newest version of project builder to build my app.
(assuming you are using cocoa)
So...here's a bit of code you can use, well, it works for me:
int windowLevel;
NSRect screenRect;
// Get the screen rect of the main display
screenRect = [[NSScreen mainScreen] frame];
// Get the shielding window level
windowLevel = CGShieldingWindowLevel();
//NSLog(@"Window level: %d", windowLevel);
// Put up a new window
mainWindow = [[NSWindow alloc] initWithContentRect:screenRect
styleMask:NSBorderlessWindowMask
backing:NSBackingStoreBuffered
defer:NO
screen:[NSScreen mainScreen]];
[mainWindow setLevel:NSFloatingWindowLevel];
[mainWindow setBackgroundColor:[NSColor blackColor]];
[Window setBackgroundColor:[NSColor blackColor]];
[mainWindow makeKeyAndOrderFront:nil];
[mainWindow setBackgroundColor:[NSColor blackColor]];
[Window setBackgroundColor:[NSColor blackColor]];
// Load the content view
[Window setFrame:screenRect display:YES];
[mainWindow setContentView:[Window contentView]];
Write back if it doesn't work :)
----------------
--[Stefano Tripi]--
--[http://www.digitalmacsoft.com/]--
--[email@hidden]--
--[ICQ: #37838014]--
----------------
"Think Different." Apple Computer
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.