Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Chart Control
  New Posts New Posts RSS Feed - European Union Energy Label
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

European Union Energy Label

 Post Reply Post Reply
Author
Message
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Topic: European Union Energy Label
    Posted: 18 February 2011 at 10:47am
any ideas to get the "energy label graph"? Or should I use MarkUpLabel?
 
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2011 at 10:56am
I would recommend the MarkupLabel - it can handle the Grid (Table), images, colours (using Border objects), Shapes, Fonts, etc...
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2011 at 11:41am

I think so. Even if I wish only to get the "simple" graph, better with 3d effect ;)

btw are you abel to use the PrintToDc to transfer the image in a PictureBox?
No example and no help (-:
 
I did a search on the forum and found some of your posts but without coming to a solution.
 
 
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2011 at 11:44am
Let me experiment with PrintToDc and get back to you shortly.
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2011 at 12:58pm
I got it work:
 

Dim s As String
s = "<StackPanel>"
s = s & "<TextBlock TextWrapping=""Wrap"" FontSize=""30"" Background=""Red"" FontWeight=""Bold"">"
s = s & "Baseline<Run FontSize=""20"" BaselineAlignment=""Top"">2</Run>"
s = s & "<InlineUIContainer BaselineAlignment=""Bottom""><Border Width=""20"" Height=""20"" Background=""Gold""/>"
s = s & "</InlineUIContainer><InlineUIContainer BaselineAlignment=""Center""><Border Width=""20"" Height=""20"" Background=""Green""/>"
s = s & "</InlineUIContainer><InlineUIContainer BaselineAlignment=""Top""> <Border Width=""20"" Height=""20"" Background=""White""/></InlineUIContainer>"
s = s & "<Run>Sample Text</Run>"
s = s & "</TextBlock>"
s = s & "</StackPanel>"
Picture1.AutoRedraw = True
With MarkupLabel1
    .Caption = s
    .PrintToDC Picture1.hDC, 0, 0, .Width, .Height
End With
 
strange: markuplabel and picturebox render pretty different  Confused
 
Tomorrow I will  create the label and post here the code.
 
TY jpbro
 
 
 
 
 
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2011 at 1:42pm
If you are drawing to a PictureBox hDc it appears you have to refresh the PictureBox to get the image to appear, so:

Me.Picture1.AutoRedraw = True
Me.MarkupLabel1.PrintToDc Me.Picture1.Hdc, 0, 0, Me.Picture1.ScaleWidth, Me.Picture1.ScaleHeight
Me.Picture1.AutoRedraw = False
Me.Picture1.Refresh
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
jpbro View Drop Down
Senior Member
Senior Member
Avatar

Joined: 12 January 2007
Status: Offline
Points: 1355
Post Options Post Options   Thanks (0) Thanks(0)   Quote jpbro Quote  Post ReplyReply Direct Link To This Post Posted: 18 February 2011 at 1:45pm
Sorry, just saw your message...try .Width / Screen.TwipsPerPixelX, .Height / Screen.TwipsPerPixelY (unless you are already using pixels for your ScaleMode). It seems to render properly for me. If it still doesn't look the same, can you post a screenshot?
Product: Xtreme SuitePro (ActiveX) version 16.2.6
Platform: Windows XP - SP3

Language: Visual Basic 6.0 SP6

Back to Top
Albert1 View Drop Down
Groupie
Groupie
Avatar

Joined: 01 February 2007
Location: Italy
Status: Offline
Points: 66
Post Options Post Options   Thanks (0) Thanks(0)   Quote Albert1 Quote  Post ReplyReply Direct Link To This Post Posted: 20 February 2011 at 3:03pm
Originally posted by jpbro jpbro wrote:

It seems to render properly for me. If it still doesn't look the same, can you post a screenshot?
 
above is markup label
below is the picturebox.
 
 
Product: Xtreme SuitePro (ActiveX) version 13.4.1 / 16.3.0

Platform: Windows Vista (32bit) - SP 2

Language: Visual Basic 6.0 (SP6)

Back to Top
Oleg View Drop Down
Admin Group
Admin Group


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 21 February 2011 at 1:16am
Yes, MarkupLabel has own Font property that will be used as default.

To be sure you have same font you can specify it on top of Markup object:

s = "<StackPanel TextElement.FontFamily='Tahoma'>"
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.109 seconds.