New topic: Looking for an example code for setDisplayConfig
<http://forums.realsoftware.com/viewtopic.php?t=46001> Page 1 of 1 [ 1 post ] Previous topic | Next topic Author Message pawn Post subject: Looking for an example code for setDisplayConfigPosted: Tue Nov 20, 2012 7:39 pm Joined: Mon Sep 22, 2008 9:01 pm Posts: 62 trying to find simple example code for setdisplayconfig to change monitor resolutions more reliably for windows 7 and windows 8 since ChangeDisplaySettings doesn't seem to be as reliable under these versions of windows. Either i implemented ChangeDisplaySettings wrong or its just not reliable after the first resolution change. It isn't allowing a second change until the program has been relaunched Protected Sub setResolution(width as integer,height as integer) dim m as new MemoryBlock(188) dim lResult as Integer = EnumDisplaySettings(0, 0,m) m.Short(68) = m.size m.short(168) = 32 'Can Be 4, 8, 16, 24, 32 m.Long(172) = width 'Screen Width m.long(176) = height 'Screen Height m.long(40)=DM_BITSPERPEL or DM_PELSWIDTH or DM_PELSHEIGHT lResult = ChangeDisplaySettings(m,CDS_FULLSCREEN) window1.FullScreen=true Select Case lResult 'Requires A Restart Case DISP_CHANGE_RESTART MsgBox "DISP_CHANGE_RESTART" 'Successful Without The Need Of Restart Case DISP_CHANGE_SUCCESSFUL MsgBox "DISP_CHANGE_SUCCESSFUL" Case Else MsgBox "Mode Not Supported" End Select End Sub Does anyone have a idea whats going wrong? Top Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 1 post ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
