vb.net改变图片亮度 vb image图片自动调整大小

VB怎么做调节亮度的程序?代码 '下面是改变屏幕的亮度的代码 。
'新建文本文档,复制下面代码,另存为form1.frm,然后双击打开 。
VERSION 5.00
Begin VB.Form Form1
Caption="Form1"
ClientHeight=1890
ClientLeft=120
ClientTop=420
ClientWidth=5775
LinkTopic="Form1"
ScaleHeight=1890
ScaleWidth=5775
StartUpPosition =3 '窗口缺省
Begin VB.HScrollBar HScroll1
Height=495
Left=240
Max=255
TabIndex=2
Top=480
Value=https://www.04ip.com/post/128
Width=5295
End
Begin VB.CommandButton Command2
Caption="Exit"
Height=615
Left=2880
TabIndex=1
Top=1080
Width=2655
End
Begin VB.CommandButton Command1
Caption="Reset"
Height=615
Left=240
TabIndex=0
Top=1080
Width=2655
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'Private Declare Function GetDeviceGammaRamp Lib "GDI32.DLL" (ByVal hDC As Long, lpRamp As Any) As Long
Private Declare Function SetDeviceGammaRamp Lib "GDI32.DLL" (ByVal hDC As Long, lpRamp As Any) As Long
Private Type Word
HiByte As Byte
LoByte As Byte
End Type
Private Type Dword
HiWord As Word
LoWord As Word
End Type
Private Type iLong
Value As Long
End Type
Private Sub Command1_Click()
HScroll1.Value = https://www.04ip.com/post/128
End Sub
Private Sub Command2_Click()
Unload Me
End Sub
Function SetBrightness(ByVal hDC As Long, ByVal wBrightness As Integer) As Long
Dim GammaArray(255, 2) As Word
Dim hGammaDC As Long, nIndex As Long
Dim wValue As iLong, dValue As Dword
hGammaDC = hDC
If hDC = 0 Then hGammaDC = Me.hDC
If hGammaDC Then
For nIndex = 0 To 255
wValue.Value = https://www.04ip.com/post/nIndex * (wBrightness + 128)
If wValue.Value65533 Then wValue.Value = https://www.04ip.com/post/65533
LSet dValue = https://www.04ip.com/post/wValue
GammaArray(nIndex, 0) = dValue.HiWord
GammaArray(nIndex, 1) = dValue.HiWord
GammaArray(nIndex, 2) = dValue.HiWord
Next
SetBrightness = SetDeviceGammaRamp(hGammaDC, GammaArray(0, 0))
End If
End Function
Private Sub Form_Unload(Cancel As Integer)
Call Command1_Click
End Sub
Private Sub HScroll1_Change()
Call SetBrightness(Me.hDC, HScroll1.Value)
Me.Caption = HScroll1.Value
End Sub
vb6.0中能不能设置image或者pictrue控件的透明度或者亮度等属性?pictrue控件不能透明,image控件倒可以,透明度是不能调的,如果非要调透明度,可以用ps等图像处理工具
pictrue和image控件都有Appearance和BorderStyle 两个属性,这两个属性可以给控件加个边框
VB 图片亮度调节,图片还原vb.net改变图片亮度,直接加载原图就好vb.net改变图片亮度了
【vb.net改变图片亮度 vb image图片自动调整大小】关于vb.net改变图片亮度和vb image图片自动调整大小的介绍到此就结束了 , 不知道你从中找到你需要的信息了吗 ?如果你还想了解更多这方面的信息,记得收藏关注本站 。

    推荐阅读