vb.net截图,vb 屏幕截图
请问:在vb.net2015中,如何编写截图程序?
Me.Refresh()
创新互联专注于网站建设,为客户提供网站设计、成都网站设计、网页设计开发服务,多年建网站服务经验,各类网站都可以开发,品牌网站建设,公司官网,公司展示网站,网站设计,建网站费用,建网站多少钱,价格优惠,收费合理。
Dim memory As Image = New Bitmap(Me.Width, Me.Height)
Dim g As Graphics = Graphics.FromImage(memory)
g.CopyFromScreen(Me.Left, Me.Top, 0, 0, New Size(Me.Width, Me.Height)) '这里是截屏核心代码
Dim FilePath As String = ""
Dim d As New SaveFileDialog
d.Filter = "JPEG图像|*.JPEG"
If d.ShowDialog = Windows.Forms.DialogResult.OK Then
FilePath = d.FileName
If FilePath = "" Then Exit Sub
'If FilePath.Substring(FilePath.Length - 1, 1) "\" Then FilePath = FilePath "\"
Else
Exit Sub
End If
d.Dispose()
memory.Save(FilePath)
MessageBox.Show("图像已经保存到: " FilePath, "截图成功", MessageBoxButtons.OK, MessageBoxIcon.Information)
VB.net点击按钮后截图,截取被当前窗体挡住的图像作为窗体背景(窗体默认无边框样式)
'没办法,需的把窗口隐藏一下,还的隐藏后延迟一下再截图。
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
网上下的VB.NET截屏程序,试过好用,哪位大侠给详细解释一下!另外,怎么把截图加载到Picturebox里?
VB.NT用的是触发事件,一按就会触发,要不你加个timer控件,延迟一秒
标题的问题:你先把图片保存,再加载
vb.net 怎么来回切换图片?
vb.net 怎么来回切换图片?1、添加控件Picturebox1和控件Timer1,将Timer1的Interval属性改为1000(即1秒),Enabled属性改为True
2、假设你要循环切换4张图片,你可以添加如下代码即可实现:
Dim a As Integer = 0
Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
If a = 4 Then
a = 0
Else
a = a + 1
End If
If a = 0 Then Me.PictureBox1.Image = Image.FromFile("1.jpg")
If a = 1 Then Me.PictureBox1.Image = Image.FromFile("2.jpg")
If a = 2 Then Me.PictureBox1.Image = Image.FromFile("3.jpg")
If a = 3 Then Me.PictureBox1.Image = Image.FromFile("4.jpg")
End Sub
VB全屏截图代码
学习vb vb.net java php ps office的朋友欢迎来歪歪频道4350,小小虾~宣 !
vb 的 仿QQ拼音截图,代码给你了,新建个记事本,然后复制下面的内容保存,然后把记事本的后缀名改为.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
vb.net 2008 如何将指定的窗体截图并保存
INTOUCH自带的就有,打印屏幕的命令
自己写个时间条件运行那命令就可以了
PRINTSCREEN这个命令 具体怎么用 看下帮助
希望我的回答对你有所帮助
如有其他问题,可以继续追问,您的采纳是我前进的动力!
网站题目:vb.net截图,vb 屏幕截图
本文URL:http://pwwzsj.com/article/hdsphs.html