<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : MarkupLabel - capture image</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Visual Basic Code Snippets : MarkupLabel - capture image]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 29 Apr 2026 12:01:39 +0000</pubDate>
  <lastBuildDate>Wed, 04 Sep 2013 23:26:44 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=15125</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[MarkupLabel - capture image :   drimage wrote:the following...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=71574&amp;title=markuplabel-capture-image#71574</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8209">arronlee</a><br /><strong>Subject:</strong> 15125<br /><strong>Posted:</strong> 04 September 2013 at 11:26pm<br /><br /><table width="99%"><tr><td class="BBquote"><img src="forum_images/quote_box.png" title="Originally posted by drimage" alt="Originally posted by drimage" style="vertical-align: text-bottom;" /> <strong>drimage wrote:</strong><br /><br /><span ="kwrd"=""></span>the following are some codes about how to <a href="http://www.rasteredge.com/how-to/vb-net-imaging/twain-scanning/" target="_blank" rel="nofollow">capture images in vb</a>.<br><pre ="csharpcode"=""><span ="kwrd"="">Public</span> <span ="kwrd"="">Function</span> TwainAcquireToRasterEdgeImageImage(<span ="kwrd"="">ByVal</span> HANDLE <span ="kwrd"="">As</span> <span ="kwrd"="">Integer</span>) <span ="kwrd"="">As</span> <span ="kwrd"="">Integer</span><br><span ="rem"="">' Acquire a single image, from the currently selected Data Source to a DIB handle</span><br><span ="kwrd"="">Public</span> <span ="kwrd"="">Function</span> TwainAcquireToDib(<span ="kwrd"="">ByVal</span> HANDLE <span ="kwrd"="">As</span> IntPtr) <span ="kwrd"="">As</span> IntPtr<br><span ="rem"="">' Acquire a single image, from the currently selected Data Source to a file</span><br><span ="kwrd"="">Public</span> <span ="kwrd"="">Function</span> TwainAcquireToFile(<span ="kwrd"="">ByVal</span> FilePath <span ="kwrd"="">As</span> <span ="kwrd"="">String</span>, <span ="kwrd"="">ByVal</span> HANDLE <span ="kwrd"="">As</span> <span ="kwrd"="">Integer</span>) <span ="kwrd"="">As</span> RasterEdgeImageStatus</pre><br></td></tr></table><br>Hi, thanks for your sharing.<br>Becayse I am not so familiar with VB.NET processing, I focus more on capturing images using <a href="http://www.rasteredge.com/how-to/csharp-imaging/twain-scanning/" target="_blank" rel="nofollow"><font color="#000000">Twain Scanning</font></a> in C#.NET. Can you offer some more tutorials about that?Thanks in advance.<br><br><br><br>Best regards,<br>Arron<br><h1><br></h1>]]>
   </description>
   <pubDate>Wed, 04 Sep 2013 23:26:44 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=71574&amp;title=markuplabel-capture-image#71574</guid>
  </item> 
  <item>
   <title><![CDATA[MarkupLabel - capture image : the following are some codes about...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=71066&amp;title=markuplabel-capture-image#71066</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=8093">drimage</a><br /><strong>Subject:</strong> 15125<br /><strong>Posted:</strong> 05 June 2013 at 10:57pm<br /><br /><span ="kwrd"></span>the following are some codes about how to <a href="http://www.rasteredge.com/how-to/vb-net-imaging/twain-scanning/" target="_blank" rel="nofollow">capture images in vb</a>.<br><pre ="csharpcode"><span ="kwrd">Public</span> <span ="kwrd">Function</span> TwainAcquireToRasterEdgeImageImage(<span ="kwrd">ByVal</span> HANDLE <span ="kwrd">As</span> <span ="kwrd">Integer</span>) <span ="kwrd">As</span> <span ="kwrd">Integer</span><br><span ="rem">' Acquire a single image, from the currently selected Data Source to a DIB handle</span><br><span ="kwrd">Public</span> <span ="kwrd">Function</span> TwainAcquireToDib(<span ="kwrd">ByVal</span> HANDLE <span ="kwrd">As</span> IntPtr) <span ="kwrd">As</span> IntPtr<br><span ="rem">' Acquire a single image, from the currently selected Data Source to a file</span><br><span ="kwrd">Public</span> <span ="kwrd">Function</span> TwainAcquireToFile(<span ="kwrd">ByVal</span> FilePath <span ="kwrd">As</span> <span ="kwrd">String</span>, <span ="kwrd">ByVal</span> HANDLE <span ="kwrd">As</span> <span ="kwrd">Integer</span>) <span ="kwrd">As</span> RasterEdgeImageStatus</pre><br>]]>
   </description>
   <pubDate>Wed, 05 Jun 2013 22:57:05 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=71066&amp;title=markuplabel-capture-image#71066</guid>
  </item> 
  <item>
   <title><![CDATA[MarkupLabel - capture image : This works fine if the XAML is...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=56769&amp;title=markuplabel-capture-image#56769</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4627">Andrew666</a><br /><strong>Subject:</strong> 15125<br /><strong>Posted:</strong> 13 February 2010 at 4:14pm<br /><br />This works fine if the XAML is fully visible - but if it is partially or totally hidden (e.g. if the containing form is not visible) then it won't work, as it depends on BitBlt.&nbsp; Putting it in a PrintPreview control doesn't work either, as you can't do anything but print from that control.<DIV>&nbsp;</DIV><DIV>It would be great if there was a "copy" method for the XAML markup label or access to a picture object...</DIV><DIV>&nbsp;</DIV><DIV>&nbsp;</DIV><DIV>--Andrew</DIV>]]>
   </description>
   <pubDate>Sat, 13 Feb 2010 16:14:47 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=56769&amp;title=markuplabel-capture-image#56769</guid>
  </item> 
  <item>
   <title><![CDATA[MarkupLabel - capture image : Cool, nice work Chris! Thanks...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=52843&amp;title=markuplabel-capture-image#52843</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2676">jpbro</a><br /><strong>Subject:</strong> 15125<br /><strong>Posted:</strong> 07 September 2009 at 8:56am<br /><br />Cool, nice work Chris! Thanks for this.]]>
   </description>
   <pubDate>Mon, 07 Sep 2009 08:56:15 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=52843&amp;title=markuplabel-capture-image#52843</guid>
  </item> 
  <item>
   <title><![CDATA[MarkupLabel - capture image : Using the MarkupLabel control...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=52825&amp;title=markuplabel-capture-image#52825</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=4225">chrisABC</a><br /><strong>Subject:</strong> 15125<br /><strong>Posted:</strong> 06 September 2009 at 8:02pm<br /><br />Using the MarkupLabel control you can create an image on the label from XAML, for example a Chart.<br><br>Here is some VB code that allows you to capture this image, with examples showing how to copy it to the Clipboard, Save to disk as a BMP, or Print to printer.<br><br>It uses API calls, and stores the captured image in a PictureBox (which is not visible).&nbsp; There may be easier or better ways to do this, but this seems to work fine.<br><br>You need a Form with a MarkupLabel on it. Add three Command Buttons and a PictureBox.<br><br>There is just one Function, and some Declarations<br>&nbsp;(<a href="uploads/20090906_195728_CaptureMarkupLa.zip" target="_blank">uploads/20090906_195728_CaptureMarkupLa.zip</a>).<br>And the following in the Button Click events:<br><br><font color="#0033cc">Private Sub cmdCopy_Click()<br>&nbsp; Set Picture1.Picture = CaptureMarkupToPicturebox<br>&nbsp; Clipboard.Clear ' Clear Clipboard.<br>&nbsp; Clipboard.SetData Picture1.Image, vbCFBitmap<br>End Sub<br><br>Private Sub cmdPrint_Click()<br>&nbsp; Set Picture1.Picture = CaptureMarkupToPicturebox<br>&nbsp; Printer.PaintPicture Picture1.Image, 100, 100 ', p.Width * Resize, p.Height * Resize<br>&nbsp; Printer.EndDoc<br>End Sub<br><br>Private Sub cmdSave_Click()<br>&nbsp; Set Picture1.Picture = CaptureMarkupToPicturebox<br>&nbsp; SavePicture Picture1.Picture, "C:\mychart.bmp"<br>End Sub</font><br><br><br>Also set the PictureBox properties (eg in Form_Load)<br>&nbsp;<font color="#0033cc">&nbsp; Picture1.AutoSize = True<br>&nbsp;&nbsp; Picture1.Visible = False</font><br><br><br>I added this code to the excellent XamlCharts sample (which you can download from this Forum).<br>Now I can Print, Copy, or Save the resulting Chart images.<br><br><a href="uploads/20090906_195728_CaptureMarkupLa.zip" target="_blank"></a><br><br><br><br><br><br><br><br>]]>
   </description>
   <pubDate>Sun, 06 Sep 2009 20:02:07 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=15125&amp;PID=52825&amp;title=markuplabel-capture-image#52825</guid>
  </item> 
 </channel>
</rss>