title image


Smiley "Screenresolution" für Flo.
Moin Flo.!Wie versprochen die Umschaltung der Bildschirmauflösung....Ich habe die Umschaltung auf vielfachen Wunsch meiner User jetzt per Button gelöst, natürlich kannst Du wohl selber die automaische Umschaltung implementieren...Die Lösung war zwar ursprünglich für Win95 gedacht, funktioniert aber auch unter 98 und NT4.IM KLASSENMODUL (FORM)Manuelle Umstellung:Private Sub Aufloesung1_Click()Call ChangeScreenResolution(800, 600)End SubPrivate Sub Aufloesung2 Click()Call ChangeScreenResolution(1024, 768)End SubMODUL AUFLOESUNG:Option Compare DatabaseOption Explicit'------------------------------------------------------------'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 BooleanPrivate Declare Function ChangeDisplaySettings Lib "user32" Alias "ChangeDisplaySettingsA" _(lpDevMode As Any, ByVal dwFlags As Long) As LongConst CCDEVICENAME = 32Const CCFORMNAME = 32Const DM_PELSWIDTH = &H80000Const DM_PELSHEIGHT = &H100000Private Type DEVMODEdmDeviceName As String * CCDEVICENAMEdmSpecVersion As IntegerdmDriverVersion As IntegerdmSize As IntegerdmDriverExtra As IntegerdmFields As LongdmOrientation As IntegerdmPaperSize As IntegerdmPaperLength As IntegerdmPaperWidth As IntegerdmScale As IntegerdmCopies As IntegerdmDefaultSource As IntegerdmPrintQuality As IntegerdmColor As IntegerdmDuplex As IntegerdmYResolution As IntegerdmTTOption As IntegerdmCollate As IntegerdmFormName As String * CCFORMNAMEdmUnusedPadding As IntegerdmBitsPerPel As IntegerdmPelsWidth As LongdmPelsHeight As LongdmDisplayFlags As LongdmDisplayFrequency As LongEnd TypeDim 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 BooleanDim I&Dim B&I = 0DoA = EnumDisplaySettings(0&, I&, DevM)I = I + 1Loop Until (A = False)DevM.dmFields = DM_PELSWIDTH Or DM_PELSHEIGHTDevM.dmPelsWidth = iWidthDevM.dmPelsHeight = iHeightB = ChangeDisplaySettings(DevM, 0)End Sub
Ich möchte ausdrücklich darauf hinweisen dass es sich bei diesem Posting um eine Meinungsäußerung gemäß §5 GG handelt. mfg Jörg

geschrieben von

Login

E-Mail:
  

Passwort:
  

Beitrag anfügen

Symbol:
 
 
 
 
 
 
 
 
 
 
 
 
 

Überschrift: