Switching resolution and positioning the window
Switching resolution and positioning the window
- Subject: Switching resolution and positioning the window
- From: Taxxodium <email@hidden>
- Date: Tue, 12 Feb 2002 20:48:03 +0100
I'm currently writing an app that needs to switch the screen resolution.
I use DrawSprocket for this since I had code that I wrote for Carbon
which I ported to Cocoa.
The problem I have is that after the screen changed I cannot reposition
the window to fill the screen. Also the menubar, which appears when
DrawSprocket is paused, doesn't get drawn correctly.
Here is how my code looks now:
TIDrawCore = [[DSpObject alloc] init]; //DSpObject is my
Cocoa implementation of DrawSprocket
[TIDrawCore initWithWidth:640 andHeight:480]; //Initializes
DrawSprocket to switch to a resolution
[TIDrawCore startFading]; //starts fading
[TIDrawCore activate]; //activated the DrawSprocket
[TIDrawCore stopFading]; //stop fading
[TIDrawCore pause]; //pause so that we can see the
menubar and the window
[TIMainWindow setFrameOrigin:[[NSScreen mainScreen] frame].origin];
//reposition the window
______________________________
Jesus De Meyer
CEO @ E dot software
http://homepage.mac.com/edotsoftware
_______________________________________________
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.