title image


Smiley Hilft das ?
Nicht ganz was du wolltest, aber ich glaube damit kannst du auch etwas anfangen







(z.B. Wenn Resulution 800 x 600...)

Sonst muss ich halt noch mal gucken

(Vielleicht getDisplaySettingsA ?!?)









'Gefunden bei: http://www.access-developer.com/

'Change Screen Resolution On The Fly

'Occasionally you may write an application that requires a specific screen resolution.

'Here 's a procedure that changes the screen to the resolution you want (assuming the video

'card supports the desired resolution).



'------------------------------------------------------------

'Comments : Global Declarations for ChangeScreenResolution

'------------------------------------------------------------



Private Declare Function EnumDisplaySettings Lib "user32" Alias "EnumDisplaySettingsA" _

(ByVal lpszDeviceName As Long, ByVal iModeNum As Long, lpDevMode As Any) As Boolean



Private Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" _

(lpDevMode As Any, ByVal dwFlags As Long) As Long



Const CCDEVICENAME = 32

Const CCFORMNAME = 32

Const DM_PELSWIDTH = &H80000

Const DM_PELSHEIGHT = &H100000



Private Type DEVMODE

dmDeviceName As String * CCDEVICENAME

dmSpecVersion As Integer

dmDriverVersion As Integer

dmSize As Integer

dmDriverExtra As Integer

dmFields As Long

dmOrientation As Integer

dmPaperSize As Integer

dmPaperLength As Integer

dmPaperWidth As Integer

dmScale As Integer

dmCopies As Integer

dmDefaultSource As Integer

dmPrintQuality As Integer

dmColor As Integer

dmDuplex As Integer

dmYResolution As Integer

dmTTOption As Integer

dmCollate As Integer

dmFormName As String * CCFORMNAME

dmUnusedPadding As Integer

dmBitsPerPel As Integer

dmPelsWidth As Long

dmPelsHeight As Long

dmDisplayFlags As Long

dmDisplayFrequency As Long

End Type



Dim DevM As DEVMODE



'------------------------------------------------------------

'Comments : Allows changing of screen resolution in Win95

' Example: Call ChangeScreenResolution(800,600)

'Parameters: iWidth, iheight: integer values of resolution

'Sets : Requested screen resolution or if screen is

' already at resolution returns true

'Returns : None

'Created by: Bridgett M. Cole, Saltware Computer Services

'Created : 12/1/97 8:15:58 PM

'------------------------------------------------------------

Public Sub ChangeScreenResolution(iWidth As Single, iHeight As Single)



Dim A As Boolean

Dim I&

Dim B&



I = 0



Do

A = EnumDisplaySettings(0&, I&, DevM)

I = I + 1

Loop Until (A = False)



DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHT

DevM.dmPelsWidth = iWidth

DevM.dmPelsHeight = iHeight

B = ChangeDisplaySettings(DevM, 0)

End Sub

















geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: