I found this example here :
but I get Run Time Error 6 - Over Flow on this function :
Private Sub SetGamma(Gamma As Double)
Dim Ramp(0 To 255, 0 To 2) As Integer
Dim nVal As Integer
Dim I As Integer
For I = 0 To 255
nVal = Lng2Int((((I + 1) / 256.01) ^ Gamma) * 65535 + 0.5) '<-- It highlights this line of code
Ramp(I, 0) = nVal
Ramp(I, 1) = nVal
Ramp(I, 2) = nVal
SetDeviceGammaRamp GetDC(0), Ramp(0, 0)
Can someone either help me fix the error for SetDeviceGammaRamp in the code project example or help me make a new vb application to set the Gama Ramp using that API.
I WOULD REALLY Prefer help to start a new application so that I can use a slider control without the control that they have included in that project.
Unless someone knows a better way of altering the screens brightness ??
Thanks and kind regards