1,用VB截取DirectX窗口內(nèi)容的程序,最好能夠直截取窗口的內(nèi)容,不要窗口標(biāo)題欄VB.NET中利用 GDI 就可以截圖,DX 也不例外。 先聲明 Imports System.
從網(wǎng)站建設(shè)到定制行業(yè)解決方案,為提供成都網(wǎng)站制作、成都網(wǎng)站設(shè)計(jì)服務(wù)體系,各種行業(yè)企業(yè)客戶提供網(wǎng)站建設(shè)解決方案,助力業(yè)務(wù)快速發(fā)展。創(chuàng)新互聯(lián)公司將不斷加快創(chuàng)新步伐,提供優(yōu)質(zhì)的建站服務(wù)。
'沒(méi)辦法,需的把窗口隱藏一下,還的隱藏后延遲一下再截圖。
Dim?WithEvents?Timer1?As?New?Timer?With?{.Interval?=?30,?.Enabled?=?False}
Dim?Imgrect?As?Rectangle
Dim?img?As?Bitmap
Private?Sub?Button1_Click(ByVal?sender?As?System.Object,?ByVal?e?As?System.EventArgs)?Handles?Button1.Click
Imgrect?=?Me.RectangleToScreen(Me.ClientRectangle)
img?=?New?Bitmap(Imgrect.Width,?Imgrect.Height)
Me.Hide()
Timer1.Start()
End?Sub
Private?Sub?Timer1_Tick(ByVal?sender?As?Object,?ByVal?e?As?System.EventArgs)?Handles?Timer1.Tick
Timer1.Stop()
Graphics.FromImage(img).CopyFromScreen(Imgrect.X,?Imgrect.Y,?0,?0,?Imgrect.Size)
Me.BackgroundImage?=?img
Me.Show()
End?Sub
學(xué)習(xí)vb vb.net java php ps office的朋友歡迎來(lái)歪歪頻道4350,小小蝦~宣 !
vb 的 仿QQ拼音截圖,代碼給你了,新建個(gè)記事本,然后復(fù)制下面的內(nèi)容保存,然后把記事本的后綴名改為.frm
VERSION 5.00
Begin VB.Form VB模擬QQ截屏
BorderStyle = 0 'None
Caption = "模擬QQ截屏"
ClientHeight = 5310
ClientLeft = 0
ClientTop = 0
ClientWidth = 6180
Icon = "模擬QQ截屏.frx":0000
KeyPreview = -1 'True
LinkTopic = "Form1"
ScaleHeight = 5310
ScaleWidth = 6180
ShowInTaskbar = 0 'False
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture1
BackColor = H00F8E2DE
BorderStyle = 0 'None
Height = 390
Left = 0
ScaleHeight = 390
ScaleWidth = 3075
TabIndex = 0
Top = 0
Visible = 0 'False
Width = 3080
Begin VB.Line Line1
BorderColor = H00FFC0C0
X1 = 1620
X2 = 1620
Y1 = 40
Y2 = 320
End
Begin VB.Label lblInfo
Alignment = 2 'Center
Appearance = 0 'Flat
BackColor = H80000005
BackStyle = 0 'Transparent
Caption = "Label2"
BeginProperty Font
Name = "宋體"
Size = 10.5
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = H00EC7A00
Height = 255
Left = 45
TabIndex = 2
Top = 75
Width = 1540
End
INTOUCH自帶的就有,打印屏幕的命令
自己寫(xiě)個(gè)時(shí)間條件運(yùn)行那命令就可以了
PRINTSCREEN這個(gè)命令 具體怎么用 看下幫助
希望我的回答對(duì)你有所幫助
如有其他問(wèn)題,可以繼續(xù)追問(wèn),您的采納是我前進(jìn)的動(dòng)力!
既然能夠取得整個(gè)屏幕,可以取到整個(gè)屏幕以后創(chuàng)建一個(gè)全屏窗體顯示靜態(tài)的屏幕圖像,然后在窗體上實(shí)現(xiàn)部分截取。
估計(jì)別的截圖也是這個(gè)原理,因?yàn)橐稽c(diǎn)開(kāi)始截圖屏幕就變?yōu)殪o態(tài)不動(dòng)了,肯定是在截圖初期復(fù)制了當(dāng)時(shí)的屏幕場(chǎng)景
VB.NT用的是觸發(fā)事件,一按就會(huì)觸發(fā),要不你加個(gè)timer控件,延遲一秒
標(biāo)題的問(wèn)題:你先把圖片保存,再加載