<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Salvare la schermata in file jpg]]></title><description><![CDATA[<p dir="auto">Ciao a tutto il forum,<br />
programmo in <a href="http://vb.net" rel="nofollow ugc">vb.net</a> ed avrei la necessità di salvare la schermata del desktop in un file jpg quando si preme un button, ma non so proprio da dove potrei iniziare.<br />
Potete aiutarmi ?</p>
]]></description><link>https://dev.connect.gt/topic/118375/salvare-la-schermata-in-file-jpg</link><generator>RSS for Node</generator><lastBuildDate>Wed, 25 Nov 2026 22:13:05 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/118375.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 04 Jan 2010 07:45:20 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Salvare la schermata in file jpg on Tue, 12 Jan 2010 13:57:39 GMT]]></title><description><![CDATA[<p dir="auto">Trovato online:</p>
<pre><code>DECLARES:
Public Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long

Public Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x
As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal
hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long)
As Long

Public Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal
hdc As Long) As Long

CODE:

  Dim x As Integer, y As Integer, nWidth As Integer, nHeight As Integer
  Dim dwRop As Long, hSrcDC As Long, hDestDC As Long
  Dim strFName As String

    Dim strTime As String ' part of the file name
    strTime = Replace(Now, "/", "_")
    strTime = Replace(strTime, ":", "_")
    strTime = Replace(strTime, " ", "_")
    Picture1.Width = Screen.Width
    Picture1.Height = Screen.Height
   
    strFName = "Peek_pic" &amp; strTime &amp; ".bmp"
    Let nWidth = Screen.Width
    Let nHeight = Screen.Height
    Let dwRop = SRCCOPY
    Let hDestDC = Picture1.hdc
    Let hSrcDC = GetDC(0)
    Call BitBlt(hDestDC, 0, 0, nWidth, nHeight, hSrcDC, 0, 0, dwRop)
    Call ReleaseDC(0, hSrcDC)
    Picture1.FontName = "Tahoma"
    Picture1.FontSize = "16.5"
    Picture1.FontBold = True
    Picture1.Print Date &amp; " " &amp; Time
    SavePicture Picture1.Image, App.Path &amp; "\" &amp; strFName
</code></pre>
]]></description><link>https://dev.connect.gt/post/882749</link><guid isPermaLink="true">https://dev.connect.gt/post/882749</guid><dc:creator><![CDATA[cali1981]]></dc:creator><pubDate>Tue, 12 Jan 2010 13:57:39 GMT</pubDate></item><item><title><![CDATA[Reply to Salvare la schermata in file jpg on Tue, 12 Jan 2010 13:57:29 GMT]]></title><description><![CDATA[<p dir="auto">Trovato online:</p>
<pre><code>DECLARES:
Public Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long

Public Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x
As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal
hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long)
As Long

Public Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal
hdc As Long) As Long

CODE:

  Dim x As Integer, y As Integer, nWidth As Integer, nHeight As Integer
  Dim dwRop As Long, hSrcDC As Long, hDestDC As Long
  Dim strFName As String

    Dim strTime As String ' part of the file name
    strTime = Replace(Now, "/", "_")
    strTime = Replace(strTime, ":", "_")
    strTime = Replace(strTime, " ", "_")
    Picture1.Width = Screen.Width
    Picture1.Height = Screen.Height
   
    strFName = "Peek_pic" &amp; strTime &amp; ".bmp"
    Let nWidth = Screen.Width
    Let nHeight = Screen.Height
    Let dwRop = SRCCOPY
    Let hDestDC = Picture1.hdc
    Let hSrcDC = GetDC(0)
    Call BitBlt(hDestDC, 0, 0, nWidth, nHeight, hSrcDC, 0, 0, dwRop)
    Call ReleaseDC(0, hSrcDC)
    Picture1.FontName = "Tahoma"
    Picture1.FontSize = "16.5"
    Picture1.FontBold = True
    Picture1.Print Date &amp; " " &amp; Time
    SavePicture Picture1.Image, App.Path &amp; "\" &amp; strFName
</code></pre>
]]></description><link>https://dev.connect.gt/post/882748</link><guid isPermaLink="true">https://dev.connect.gt/post/882748</guid><dc:creator><![CDATA[cali1981]]></dc:creator><pubDate>Tue, 12 Jan 2010 13:57:29 GMT</pubDate></item></channel></rss>