• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Switching resolution and positioning the window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Prev by Date: Re: NSPopUpButton is too smart for it's own good
  • Next by Date: Re: Memory Mania Revisted
  • Previous by thread: Re: html link
  • Next by thread: Re: initWithWindowRef (NSQuickDrawView solution)?
  • Index(es):
    • Date
    • Thread