<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="ru">
		<id>http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FScreen_Capture</id>
		<title>VB.Net/GUI/Screen Capture - История изменений</title>
		<link rel="self" type="application/atom+xml" href="http://www.vbex.ru/index.php?action=history&amp;feed=atom&amp;title=VB.Net%2FGUI%2FScreen_Capture"/>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/Screen_Capture&amp;action=history"/>
		<updated>2026-04-05T05:43:49Z</updated>
		<subtitle>История изменений этой страницы в вики</subtitle>
		<generator>MediaWiki 1.30.0</generator>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/Screen_Capture&amp;diff=510&amp;oldid=prev</id>
		<title> в 16:40, 26 мая 2010</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/Screen_Capture&amp;diff=510&amp;oldid=prev"/>
				<updated>2010-05-26T16:40:06Z</updated>
		
		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr style=&quot;vertical-align: top;&quot; lang=&quot;ru&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;← Предыдущая&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: white; color:black; text-align: center;&quot;&gt;Версия 16:40, 26 мая 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; style=&quot;text-align: center;&quot; lang=&quot;ru&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(нет различий)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
			</entry>

	<entry>
		<id>http://www.vbex.ru/index.php?title=VB.Net/GUI/Screen_Capture&amp;diff=511&amp;oldid=prev</id>
		<title>Admin: 1 версия</title>
		<link rel="alternate" type="text/html" href="http://www.vbex.ru/index.php?title=VB.Net/GUI/Screen_Capture&amp;diff=511&amp;oldid=prev"/>
				<updated>2010-05-26T12:43:25Z</updated>
		
		<summary type="html">&lt;p&gt;1 версия&lt;/p&gt;
&lt;p&gt;&lt;b&gt;Новая страница&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Screen Capture Demo==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents Button1 As System.Windows.Forms.Button&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.PictureBox1 = New System.Windows.Forms.PictureBox()&lt;br /&gt;
        Me.Button1 = New System.Windows.Forms.Button()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.PictureBox1.Location = New System.Drawing.Point(288, 16)&lt;br /&gt;
        Me.PictureBox1.Size = New System.Drawing.Size(192, 136)&lt;br /&gt;
        Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Button1.Location = New System.Drawing.Point(32, 40)&lt;br /&gt;
        Me.Button1.Size = New System.Drawing.Size(208, 40)&lt;br /&gt;
        Me.Button1.Text = &amp;quot;Capture the Screen&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(496, 166)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.Button1, Me.PictureBox1})&lt;br /&gt;
        Me.Text = &amp;quot;Capturing the Screen, Quick and Easy&amp;quot;&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click&lt;br /&gt;
        GetScreenCapture(True).Save(&amp;quot;c:\screengrab.bmp&amp;quot;)&lt;br /&gt;
        PictureBox1.Image = GetScreenCapture()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Public Function GetScreenCapture( _&lt;br /&gt;
        Optional ByVal FullScreen As Boolean = False) As Image&lt;br /&gt;
        Dim objSK As SendKeys&lt;br /&gt;
        Dim imgCapture As Image&lt;br /&gt;
        If FullScreen = True Then&lt;br /&gt;
            objSK.SendWait(&amp;quot;{PRTSC 2}&amp;quot;)&lt;br /&gt;
        Else&lt;br /&gt;
            objSK.SendWait(&amp;quot;%{PRTSC}&amp;quot;)&lt;br /&gt;
        End If&lt;br /&gt;
        Dim objData As IDataObject = Clipboard.GetDataObject()&lt;br /&gt;
        Return objData.GetData(DataFormats.Bitmap)&lt;br /&gt;
    End Function&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Screen snapshot==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;source lang=&amp;quot;vbnet&amp;quot;&amp;gt;  &lt;br /&gt;
Imports System.Windows.Forms&lt;br /&gt;
Imports System.Drawing&lt;br /&gt;
Public Class Form1&lt;br /&gt;
    Inherits System.Windows.Forms.Form&lt;br /&gt;
    Public Sub New()&lt;br /&gt;
        MyBase.New()&lt;br /&gt;
        InitializeComponent()&lt;br /&gt;
    End Sub&lt;br /&gt;
    Friend WithEvents MyPrintDocument As System.Drawing.Printing.PrintDocument&lt;br /&gt;
    Friend WithEvents MyPrintDialog As System.Windows.Forms.PrintDialog&lt;br /&gt;
    Friend WithEvents MyPictureBox As System.Windows.Forms.PictureBox&lt;br /&gt;
    Friend WithEvents Label1 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents DataGrid1 As System.Windows.Forms.DataGrid&lt;br /&gt;
    Friend WithEvents MonthCalendar1 As System.Windows.Forms.MonthCalendar&lt;br /&gt;
    Friend WithEvents Label2 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents Label3 As System.Windows.Forms.Label&lt;br /&gt;
    Friend WithEvents MonthCalendar2 As System.Windows.Forms.MonthCalendar&lt;br /&gt;
    Friend WithEvents LinkLabel1 As System.Windows.Forms.LinkLabel&lt;br /&gt;
    &amp;lt;System.Diagnostics.DebuggerStepThrough()&amp;gt; Private Sub InitializeComponent()&lt;br /&gt;
        Me.MyPrintDocument = New System.Drawing.Printing.PrintDocument()&lt;br /&gt;
        Me.MyPrintDialog = New System.Windows.Forms.PrintDialog()&lt;br /&gt;
        Me.MyPictureBox = New System.Windows.Forms.PictureBox()&lt;br /&gt;
        Me.Label1 = New System.Windows.Forms.Label()&lt;br /&gt;
        Me.DataGrid1 = New System.Windows.Forms.DataGrid()&lt;br /&gt;
        Me.MonthCalendar1 = New System.Windows.Forms.MonthCalendar()&lt;br /&gt;
        Me.Label2 = New System.Windows.Forms.Label()&lt;br /&gt;
        Me.Label3 = New System.Windows.Forms.Label()&lt;br /&gt;
        Me.MonthCalendar2 = New System.Windows.Forms.MonthCalendar()&lt;br /&gt;
        Me.LinkLabel1 = New System.Windows.Forms.LinkLabel()&lt;br /&gt;
        CType(Me.DataGrid1, System.ruponentModel.ISupportInitialize).BeginInit()&lt;br /&gt;
        Me.SuspendLayout()&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MyPictureBox.Location = New System.Drawing.Point(296, 16)&lt;br /&gt;
        Me.MyPictureBox.Size = New System.Drawing.Size(16, 16)&lt;br /&gt;
        Me.MyPictureBox.Visible = False&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label1.Font = New System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Underline), System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
        Me.Label1.Location = New System.Drawing.Point(16, 16)&lt;br /&gt;
        Me.Label1.Size = New System.Drawing.Size(224, 23)&lt;br /&gt;
        Me.Label1.Text = &amp;quot;Report&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.DataGrid1.Font = New System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.0!)&lt;br /&gt;
        Me.DataGrid1.GridLineColor = System.Drawing.Color.RoyalBlue&lt;br /&gt;
        Me.DataGrid1.HeaderBackColor = System.Drawing.Color.MidnightBlue&lt;br /&gt;
        Me.DataGrid1.Location = New System.Drawing.Point(16, 48)&lt;br /&gt;
        Me.DataGrid1.Size = New System.Drawing.Size(392, 368)&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MonthCalendar1.Location = New System.Drawing.Point(432, 256)&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label2.Font = New System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Underline), System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
        Me.Label2.Location = New System.Drawing.Point(432, 224)&lt;br /&gt;
        Me.Label2.Size = New System.Drawing.Size(200, 23)&lt;br /&gt;
        Me.Label2.Text = &amp;quot;Report:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.Label3.Font = New System.Drawing.Font(&amp;quot;Tahoma&amp;quot;, 8.25!, (System.Drawing.FontStyle.Bold Or System.Drawing.FontStyle.Underline), System.Drawing.GraphicsUnit.Point, CType(0, Byte))&lt;br /&gt;
        Me.Label3.Location = New System.Drawing.Point(432, 16)&lt;br /&gt;
        Me.Label3.Size = New System.Drawing.Size(200, 23)&lt;br /&gt;
        Me.Label3.Text = &amp;quot;Report:&amp;quot;&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.MonthCalendar2.Location = New System.Drawing.Point(432, 48)&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.LinkLabel1.Location = New System.Drawing.Point(368, 16)&lt;br /&gt;
        Me.LinkLabel1.Size = New System.Drawing.Size(32, 16)&lt;br /&gt;
        &amp;quot;&lt;br /&gt;
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)&lt;br /&gt;
        Me.ClientSize = New System.Drawing.Size(648, 430)&lt;br /&gt;
        Me.Controls.AddRange(New System.Windows.Forms.Control() {Me.LinkLabel1, Me.Label3, Me.MonthCalendar2, Me.Label2, Me.MonthCalendar1, Me.DataGrid1, Me.Label1, Me.MyPictureBox})&lt;br /&gt;
        CType(Me.DataGrid1, System.ruponentModel.ISupportInitialize).EndInit()&lt;br /&gt;
        Me.ResumeLayout(False)&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Declare Auto Function BitBlt Lib &amp;quot;gdi32.dll&amp;quot; (ByVal hdcDest As IntPtr, ByVal _&lt;br /&gt;
        nXDest As Integer, ByVal nYDest As Integer, ByVal nWidth As Integer, ByVal nHeight _&lt;br /&gt;
        As Integer, ByVal hdcSrc As IntPtr, ByVal nXSrc As Integer, _&lt;br /&gt;
        ByVal nYSrc As Integer, ByVal dwRop As System.Int32) As Boolean&lt;br /&gt;
    Private bmpScreenshot As Bitmap&lt;br /&gt;
    Private Sub MyPrintDocument_PrintPage(ByVal sender As System.Object, ByVal e As System.Drawing.Printing.PrintPageEventArgs) Handles MyPrintDocument.PrintPage&lt;br /&gt;
        Dim objImageToPrint As Graphics = e.Graphics&lt;br /&gt;
        objImageToPrint.DrawImage(bmpScreenshot, 0, 0)&lt;br /&gt;
        bmpScreenshot.Dispose()&lt;br /&gt;
        objImageToPrint.Dispose()&lt;br /&gt;
        e.HasMorePages = False&lt;br /&gt;
    End Sub&lt;br /&gt;
    Private Sub LinkLabel1_LinkClicked(ByVal sender As System.Object, ByVal e As System.Windows.Forms.LinkLabelLinkClickedEventArgs) Handles LinkLabel1.LinkClicked&lt;br /&gt;
        LinkLabel1.Visible = False&lt;br /&gt;
        Dim objGraphics As Graphics = Me.CreateGraphics&lt;br /&gt;
        Dim objSize As Size = Me.Size&lt;br /&gt;
        Const SRCCOPY As Integer = &amp;amp;HCC0020&lt;br /&gt;
        bmpScreenshot = New Bitmap(objSize.Width, objSize.Height, objGraphics)&lt;br /&gt;
        Dim objGraphics2 As Graphics = objGraphics.FromImage(bmpScreenshot)&lt;br /&gt;
        Dim deviceContext1 As IntPtr = objGraphics.GetHdc&lt;br /&gt;
        Dim deviceContext2 As IntPtr = objGraphics2.GetHdc&lt;br /&gt;
        BitBlt(deviceContext2, 0, 0, Me.ClientRectangle.Width, _&lt;br /&gt;
            Me.ClientRectangle.Height, deviceContext1, 0, 0, SRCCOPY)&lt;br /&gt;
        objGraphics.ReleaseHdc(deviceContext1)&lt;br /&gt;
        objGraphics2.ReleaseHdc(deviceContext2)&lt;br /&gt;
        MyPrintDialog.Document = MyPrintDocument&lt;br /&gt;
        If MyPrintDialog.ShowDialog = DialogResult.OK Then&lt;br /&gt;
            MyPrintDocument.Print()&lt;br /&gt;
        End If&lt;br /&gt;
        LinkLabel1.Visible = True&lt;br /&gt;
    End Sub&lt;br /&gt;
End Class&lt;br /&gt;
   &lt;br /&gt;
    &lt;br /&gt;
  &amp;lt;/source&amp;gt;&lt;/div&gt;</summary>
		<author><name>Admin</name></author>	</entry>

	</feed>