vb@rchiv
VB Classic
VB.NET
ADO.NET
VBA
C#
Mails senden, abrufen und decodieren - ganz easy ;-)  
 vb@rchiv Quick-Search: Suche startenErweiterte Suche starten   Impressum  | Datenschutz  | vb@rchiv CD Vol.6  | Shop Copyright ©2000-2024
 
zurück

 Sie sind aktuell nicht angemeldet.Funktionen: Einloggen  |  Neu registrieren  |  Suchen

VB & Windows API
Re: SetDeviceGammaRamp funktioniert nicht 
Autor: ModeratorMartoeng (Moderator)
Datum: 14.06.11 20:30

Also bei mir funktioniert der verlinkte (und in VB konvertierte) Code ganz gut:

Function SetBrightness(ByVal wBrightness As Long) As Long
' /*
' Changes the brightness of the entire screen.
' This function may not work properly in some video cards.
'
' The wBrightness value should be a number between 0 and 255.
' 128 = Regular brightness
' above 128 = brighter
' below 128 = darker
'
'    If hDC is NULL, SetBrightness automatically load and release
'    the display device context for you.
'
' */
    Dim bReturn As Long, nIndex As Long
    Dim wValue As Long
    bReturn = 0
 
'      //Generate the 256-colors array for the specified wBrightness value.
   Dim GammaArray(0 To 255, 0 To 2) As Integer
 
   For nIndex = 0 To 255
       wValue = Min(nIndex * (wBrightness + 128), 65535)
       GammaArray(nIndex, 0) = Lng2Int(wValue)
       GammaArray(nIndex, 1) = Lng2Int(wValue)
       GammaArray(nIndex, 2) = Lng2Int(wValue)
       List2.AddItem nIndex & ": " & wValue 'GammaArray(nIndex, 0)
   Next
 
'      //Set the GammaArray values into the display device context.
   bReturn = SetDeviceGammaRamp(Me.hDC, GammaArray(0, 0))
 
 
 
    SetBrightness = bReturn
End Function
 
Function Min(ByVal val1 As Long, ByVal val2 As Long) As Long
    If val1 > val2 Then
        Min = val2
    Else
        Min = val1
    End If
End Function


vbarchiv.dll (Freeware), Tutorials uvm. auf http://www.martoeng.com.
alle Nachrichten anzeigenGesamtübersicht  |  Zum Thema  |  Suchen

 ThemaViews  AutorDatum
SetDeviceGammaRamp funktioniert nicht4.839dbmaxpayne14.06.11 12:48
Re: SetDeviceGammaRamp funktioniert nicht3.424ModeratorMartoeng14.06.11 12:52
Re: SetDeviceGammaRamp funktioniert nicht3.422dbmaxpayne14.06.11 13:02
Re: SetDeviceGammaRamp funktioniert nicht3.426ModeratorMartoeng14.06.11 14:20
Re: SetDeviceGammaRamp funktioniert nicht3.402dbmaxpayne14.06.11 15:15
Re: SetDeviceGammaRamp funktioniert nicht3.278ModeratorMartoeng14.06.11 15:56
Re: SetDeviceGammaRamp funktioniert nicht3.265ModeratorMartoeng14.06.11 20:30
Re: SetDeviceGammaRamp funktioniert nicht3.318dbmaxpayne15.06.11 08:18
Re: SetDeviceGammaRamp funktioniert nicht3.337ModeratorMartoeng15.06.11 11:32
Re: SetDeviceGammaRamp funktioniert nicht3.364dbmaxpayne15.06.11 12:18
Re: SetDeviceGammaRamp funktioniert nicht3.249ModeratorMartoeng15.06.11 14:08
Re: SetDeviceGammaRamp funktioniert nicht3.303dbmaxpayne15.06.11 14:45
Re: SetDeviceGammaRamp funktioniert nicht3.297ModeratorMartoeng15.06.11 15:08
Re: SetDeviceGammaRamp funktioniert nicht3.396dbmaxpayne15.06.11 15:39
Re: SetDeviceGammaRamp funktioniert nicht3.333ModeratorMartoeng15.06.11 15:49

Sie sind nicht angemeldet!
Um auf diesen Beitrag zu antworten oder neue Beiträge schreiben zu können, müssen Sie sich zunächst anmelden.

Einloggen  |  Neu registrieren

Funktionen:  Zum Thema  |  GesamtübersichtSuchen 

nach obenzurück
 
   

Copyright ©2000-2024 vb@rchiv Dieter Otter
Alle Rechte vorbehalten.
Microsoft, Windows und Visual Basic sind entweder eingetragene Marken oder Marken der Microsoft Corporation in den USA und/oder anderen Ländern. Weitere auf dieser Homepage aufgeführten Produkt- und Firmennamen können geschützte Marken ihrer jeweiligen Inhaber sein.

Diese Seiten wurden optimiert für eine Bildschirmauflösung von mind. 1280x1024 Pixel