Print Page | Close Window

Generate image from xaml

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Suite Pro
Forum Description: Topics Related to Codejock Suite Pro
URL: http://forum.codejock.com/forum_posts.asp?TID=18061
Printed Date: 28 September 2024 at 1:27am
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: Generate image from xaml
Posted By: mlg
Subject: Generate image from xaml
Date Posted: 16 March 2011 at 6:38am
Hi!

There are some control or method for generate image from xaml and i can save the image?


 I have version 15.

Thanks!



Replies:
Posted By: jpbro
Date Posted: 23 March 2011 at 8:56pm
You can use the PrintToDc method of the MarkupLabel controlto draw to a PictureBox or form, and then use the SavePicture method to save that image.

Something like:


Option Explicit

Private Sub Form_Load()
   Const c_XamlFile As String = "C:\Program Files\Codejock Software\ActiveX\Xtreme SuitePro ActiveX v15.0.1\Utils\Markups\ColoredToucan.xaml"
  
   Dim l_Ff As Integer
   Dim l_Xaml As String
  
   l_Xaml = Space$(FileLen(c_XamlFile))
   l_Ff = FreeFile
   Open c_XamlFile For Binary Access Read As #l_Ff
   Get #l_Ff, , l_Xaml
   Close #l_Ff
  
   Me.Picture1.AutoRedraw = True
  
   With Me.MarkupLabel1
      .Caption = l_Xaml
      .PrintToDC Me.Picture1.hDC, 0, 0, Me.Picture1.ScaleWidth \ Screen.TwipsPerPixelX, Me.Picture1.ScaleHeight \ Screen.TwipsPerPixelY
   End With
  
   SavePicture Me.Picture1.Image, "C:\test.bmp"
End Sub



-------------
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6



Posted By: mlg
Date Posted: 24 March 2011 at 7:22am
thank you!!


Posted By: Andrew666
Date Posted: 26 March 2011 at 4:21pm
However, please correct me if I'm wrong, but there's no way to capture the part of the image that is not visible (if there is any) - e.g. in the situation where the XAML is clipped in the application window. 
 
--A


Posted By: mlg
Date Posted: 09 May 2011 at 3:34am
some idea for capture the part of the image that is not visible?



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net