我的做法是先寫入一個(gè)圖片變量,然后再寫入到容器上。容器設(shè)置雙緩沖
定海網(wǎng)站制作公司哪家好,找創(chuàng)新互聯(lián)建站!從網(wǎng)頁(yè)設(shè)計(jì)、網(wǎng)站建設(shè)、微信開發(fā)、APP開發(fā)、成都響應(yīng)式網(wǎng)站建設(shè)公司等網(wǎng)站項(xiàng)目制作,到程序開發(fā),運(yùn)營(yíng)維護(hù)。創(chuàng)新互聯(lián)建站2013年至今到現(xiàn)在10年的時(shí)間,我們擁有了豐富的建站經(jīng)驗(yàn)和運(yùn)維經(jīng)驗(yàn),來(lái)保證我們的工作的順利進(jìn)行。專注于網(wǎng)站建設(shè)就選創(chuàng)新互聯(lián)建站。
還有你說的控件必須透明不太明白,可以直接在容器上繪圖,不需要控件,圖片的透明度可以用RGBA色的A值(透明度)來(lái)控制
我這個(gè)也是實(shí)時(shí)翻滾刷新的,不會(huì)閃!
可以參考下面的代碼:
Dim?myexcel As excel.Application
On Error Resume Next
Set myexcel = GetObject(, "Excel.Application")
myexcel.Application.ScreenUpdating = False
擴(kuò)展資料:
VB.NET關(guān)鍵詞
Namespace包含類似或相關(guān)功能的類的集合
Class用來(lái)定義一個(gè)類用以存儲(chǔ)對(duì)象的屬性、方法和事件
Sub子過程,可以把要使用的數(shù)據(jù)以參數(shù)形式傳入,但不返回值
Function函數(shù),同樣可以傳參數(shù),但要求有返回值
Property屬性過程,設(shè)置或返回對(duì)象的屬性值
Nothing表示一個(gè)變量沒有值,與其他語(yǔ)言或數(shù)據(jù)庫(kù)中的null等價(jià)
參考資料來(lái)源:百度百科-Visual Basic .NET
vb點(diǎn)虐 中關(guān)閉屏幕刷新方法為:
1、修改完恢復(fù)初始狀態(tài)callformload。
2、顯示修改后信息,控件refresh,例如用data控件,則data1.refresh即可。
3、數(shù)據(jù)庫(kù)資料用label顯示,則label.refresh同時(shí)用me.refresh。
這篇文章介紹了VB.NET設(shè)置屏幕分辨率、顏色位數(shù)、刷新率
實(shí)例代碼,有需要的朋友可以參考一下
復(fù)制代碼
代碼如下:
Private
Declare
Function
GetDeviceCaps
Lib
"gdi32"
(ByVal
hdc
As
Long,
ByVal
nIndex
As
Long)
As
Long
Private
Declare
Function
ChangeDisplaySettings
Lib
"user32"
Alias
"ChangeDisplaySettingsA"
(lpDevMode
As
Any,
ByVal
dwflags
As
Long)
As
Long
Private
Const
CCDEVICENAME
As
Long
=
32
Private
Const
CCFORMNAME
As
Long
=
32
Private
Const
DM_BITSPERPEL
As
Long
=
H40000
Private
Const
DM_PELSWIDTH
As
Long
=
H80000
Private
Const
DM_PELSHEIGHT
As
Long
=
H100000
Private
Const
DM_DISPLAYFLAGS
As
Long
=
H200000
Private
Const
DM_DISPLAYFREQUENCY
=
H400000
Private
Const
CDS_FORCE
As
Long
=
H80000000
Private
Const
BITSPIXEL
As
Long
=
12
Private
Const
HORZRES
As
Long
=
8
Private
Const
VERTRES
As
Long
=
10
Private
Const
VREFRESH
=
116
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
Private
Sub
cmdChangeDesktopMode_Click()
Dim
DM
As
DEVMODE
With
DM
.dmPelsWidth
=
CInt(txtNewWidth.Text)
.dmPelsHeight
=
CInt(txtNewHeight.Text)
.dmBitsPerPel
=
CInt(txtNewColor.Text)
.dmDisplayFrequency
=
CInt(txtNewFreq.Text)
.dmFields
=
DM_PELSWIDTH
Or
DM_PELSHEIGHT
Or
DM_BITSPERPEL
Or
DM_DISPLAYFREQUENCY
.dmSize
=
LenB(DM)
End
With
If
ChangeDisplaySettings(DM,
CDS_FORCE)
Then
MsgBox
"錯(cuò)誤!不支持此模式!"
End
If
End
Sub
Private
Sub
Form_Load()
txtOldWidth.Text
=
GetDeviceCaps(Me.hdc,
HORZRES)
txtOldHeight.Text
=
GetDeviceCaps(Me.hdc,
VERTRES)
txtOldColor.Text
=
GetDeviceCaps(Me.hdc,
BITSPIXEL)
txtOldFreq.Text
=
GetDeviceCaps(Me.hdc,
VREFRESH)
End
Sub