Results 1 to 35 of 35

Thread: Charts controls with GDI+

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    439

    Charts controls with GDI+

    It is a suite of user controls, to create statistical graphs. There are four controls but some have different styles, it could be said that they are the main and most used. Each user control is independent of the other, so it does not require implementing the entire suite, of course this does not make it more optimal in code reduction, but it is that habit of not depending on anything, there are many lines of code and surely there will be more of some bugs turning, for my part I think that my desire with this reached here, of course if someone finds an error or suggestion, please inform us to correct it.

    In the download you will find an example of each one and a main project that includes all and some additions to simulate a Dashboard.
    Name:  DashBoard.jpg
Views: 4874
Size:  32.4 KB

    see more in http://leandroascierto.com/blog/charts-control-con-gdi
    Attached Files Attached Files
    leandroascierto.com Visual Basic 6 projects

  2. #2
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    597

    Re: Charts controls with GDI+

    it's incredible.
    I tested PerMonitorV2 at 175% Scale, The graphics are clean and Tool-tips are showing at right position (not the best position at below mouse pointer). Just the ClsResizer may have some problem.
    Attached Images Attached Images  
    Last edited by DaveDavis; Sep 2nd, 2020 at 01:08 AM.

  3. #3
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,371

    Re: Charts controls with GDI+

    Quote Originally Posted by DaveDavis View Post
    it's incredible.
    I tested PerMonitorV2 at 175% Scale, The graphics are clean and Tool-tips are showing at right position (not the best position at below mouse pointer). Just the ClsResizer may have some problem.
    I don't understand your PerMonitorV2. For me the graphic is scaled like before. (comparing the graphic of your Form2 with the one of LeandroA)

  4. #4
    Hyperactive Member
    Join Date
    Jun 2016
    Location
    EspaƱa
    Posts
    503

    Re: Charts controls with GDI+

    very good work, it looks great.
    as always very good contribution.
    Greetings

  5. #5

  6. #6

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    439

    Re: Charts controls with GDI+

    Quote Originally Posted by wqweto View Post
    You don't need ManageGDIToken function. Too bad this piece of LaVolpe's code got cargo-cult status.
    It is already a habit, I always think about it again, perhaps as I never fail I continue to use it, in win XP it had more sense because if GDI + was not closed(Shutdown) the ide would fall, nowadays only with GdiplusStartup would be enough.


    @DaveDavis DPI 175% and 225% it's a nice headache in vb
    leandroascierto.com Visual Basic 6 projects

  7. #7
    Fanatic Member
    Join Date
    Aug 2016
    Posts
    597

    Re: Charts controls with GDI+

    Quote Originally Posted by Krool View Post
    I don't understand your PerMonitorV2. For me the graphic is scaled like before. (comparing the graphic of your Form2 with the one of LeandroA)
    Three charts at bottom are not showing entirely.

  8. #8
    Addicted Member
    Join Date
    May 2016
    Location
    China
    Posts
    197

    Re: Charts controls with GDI+

    How to set different data in ucChartBar?
    For example, one bar shows last year's data, and another bar shows this year's data.
    QQ: 289778005

  9. #9

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    439

    Re: Charts controls with GDI+

    Quote Originally Posted by ChenLin View Post
    How to set different data in ucChartBar?
    For example, one bar shows last year's data, and another bar shows this year's data.
    look inside the ucCartBar folder there is an example of use, you must call the AddSerie function
    leandroascierto.com Visual Basic 6 projects

  10. #10
    Addicted Member
    Join Date
    May 2016
    Location
    China
    Posts
    197

    Re: Charts controls with GDI+

    Thank you LeandroA, I will continue testing.
    QQ: 289778005

  11. #11
    PowerPoster
    Join Date
    Jun 2012
    Posts
    2,371

    Re: Charts controls with GDI+

    Quote Originally Posted by DaveDavis View Post
    Three charts at bottom are not showing entirely.
    I did not mean that. The form (non-client) is automatically scaled by the OS. If the DPI changed the size and font and graphics needs to draw "bigger" or "smaller" as per current monitor. And that's not the case..

    It would be better you do not use PerMonitorV2 and just use system DPI awareness. That's already a small challenge to properly handle that.

    If you then move to another screen with DPI change let the OS bitmap stretch your Form. So it looks correctly sized though a bit blurry.. but better than nothing.

    I propose you read LaVolpe tutorial: https://www.vbforums.com/showthread....eing-DPI-Aware
    Last edited by Krool; Sep 3rd, 2020 at 01:14 AM.

  12. #12
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,093

    Re: Charts controls with GDI+

    Quote Originally Posted by LeandroA View Post
    . . . in win XP it had more sense because if GDI + was not closed(Shutdown) the ide would fall
    I'm constantly testing GDI+ code in VBIDE under XP in a VM and it never fails (GPF/AV) when gdiplus.dll is loaded only once w/ GdiplusStartup and never terminated.

    I'm using something like this in user-controls Initialize event

    Code:
        If GetModuleHandle("gdiplus") = 0 Then
            aInput(0) = 1
            Call GdiplusStartup(0, aInput(0))
        End If
    Btw, how do you test for GDI+ leaks? I know how it can be done for GDI but for GDI+ it seems not possible, so code dealing with GDI+ handles has to be rock stable.

    cheers,
    </wqw>

  13. #13
    Addicted Member
    Join Date
    May 2016
    Location
    China
    Posts
    197

    Re: Charts controls with GDI+

    About ucChartBar:
    It would be great if the FillGradient property can set a gradient color.

    If the AddSerie property does not use the current Collection, it will be more convenient to use the Recordset.

    Can the LablesFormats property be set and not displayed? Now if it is not set, Labels will not be displayed at the same time.


    Modify the FillOpacity attribute: avoid setting it to an invalid number exceeding 100:
    Code:
    Public Property Let FillOpacity(ByVal New_Value As Long)
        m_FillOpacity = IIf(New_Value > 100, 100, New_Value)
        PropertyChanged "FillOpacity"
        Refresh
    End Property
    Last edited by ChenLin; Sep 4th, 2020 at 04:45 AM.
    QQ: 289778005

  14. #14

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    439

    Re: Charts controls with GDI+

    @wqweto I don't know if there is something similar in GDI +, I just beg not to forget to delete it

    @chenLin I did not want to add a second color in the properties, you can change it if you wish, I will plant it in the following way, if color1 is alpha 100%, internally color2 is white alpha 100%, if color1 aplha is less than 100% color2 it is 100% transparent.

    I am not very familiar with recorset, it is not much information that is loaded to a control so passing a recorset to a collection is not a lot of work, also a charts is not always used with databases

    LablesFormats, I did not like what I did very much, I did not find a better way to do it without making it very extensive
    leandroascierto.com Visual Basic 6 projects

  15. #15
    Addicted Member
    Join Date
    Feb 2015
    Posts
    154

    Re: Charts controls with GDI+

    Quote Originally Posted by wqweto View Post
    .....Btw, how do you test for GDI+ leaks? I know how it can be done for GDI but for GDI+ it seems not possible, so code dealing with GDI+ handles has to be rock stable.

    cheers,
    </wqw>
    I've never had any leakage issues with GDI+. I just make sure to always dynamically delete objects & handles when done with them.

  16. #16
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,093

    Re: Charts controls with GDI+

    Quote Originally Posted by SomeYguy View Post
    I've never had any leakage issues with GDI+. I just make sure to always dynamically delete objects & handles when done with them.
    Is this machine translated? This is like advising not to worry and to always destroy GDI objects & handles and everything will be ok. Until it's not ok because for one reason or another you miss on destroying everything which is the point. . . Anyway.

    Can you share with us how do you prevent leakage in GDI+? How do you detect it? Which perfmon counters do you use? Which API functions report outstanding handles or similar debug aides?

    cheers,
    </wqw>

  17. #17
    Junior Member
    Join Date
    Jul 2020
    Posts
    23

    Re: Charts controls with GDI+

    Hello Leandro. I don't understand how in ucTreeMaps component, i can make rows of 'Buttons' with the same height and width. As I showed in the picture. Thank!
    Attachment 178644
    Attached Images Attached Images  
    Last edited by Visualman; Sep 8th, 2020 at 02:02 PM.

  18. #18

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    439

    Re: Charts controls with GDI+

    Quote Originally Posted by Visualman View Post
    Hello Leandro. I don't understand how in ucTreeMaps component, i can make rows of 'Buttons' with the same height and width. As I showed in the picture. Thank!
    Attachment 178644
    I do not recommend this control for that purpose, better use LabelPlus.ctl together with the ClsResizer module
    leandroascierto.com Visual Basic 6 projects

  19. #19
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Charts controls with GDI+

    Quote Originally Posted by wqweto View Post
    I'm constantly testing GDI+ code in VBIDE under XP in a VM and it never fails (GPF/AV) when gdiplus.dll is loaded only once w/ GdiplusStartup and never terminated.
    Just FYI, back in the XP days (when that ManageGDIToken stuff was created), one could crash XP with GDI+ and not shutting it down. That was why the thunk was created. Since then, GDI+ has gone through some revisions and maybe the problem is no longer present? Don't know for sure. Within XP, these were the steps to cause a crash on-demand most times (others were able to reproduce this too). Otherwise, the crash was too intermittent to test. P.S. Don't ask me about the relationship between IE and VB at that time; it was just a pattern that was easy to reproduce.
    Start new project
    1. On form Load, start GDI+. On Unload, stop GDI+
    2. Run project
    3. Click VB IDE's toolbar STOP button or execute an END statement
    4. Open a new instance of Internet Explorer
    5. Crash will occur within 5 seconds, if it is going to occur.
    I can make some guesses though. GDI+ creates its own window (GDI+ Hook Window Class), we can find that. It is in same process as VB but in a different thread. That window hooks into GDIplus.dll possibly, or at least makes calls to it. When IDE is shut down, GDIplus may have been released (FreeLibrary) by VB. At some point that window made a call to dead code (freed memory) & crash. Maybe newer revisions increment ref count on the library & decrement when window is destroyed/process shuts down? Maybe the problem is still there, just don't know the conditions to trigger it.

    One more follow-up. On Win10, I started GDI+ and did not shut it down, but closed the project in IDE. I set Spy++ on that GDI+ window. I went to work & 9+ hours later when I came home, the IDE was still alive and that GDI+ window had some system messages logged. It would appear, that somewhere along the road, that particular 'bug' in GDI+ may have been fixed; don't know when.
    Last edited by LaVolpe; Sep 10th, 2020 at 02:53 PM.
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  20. #20
    VB-aholic & Lovin' It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    Beside Waldo
    Posts
    19,541

    Re: Charts controls with GDI+

    Quote Originally Posted by DaveDavis View Post
    it's incredible.
    I tested PerMonitorV2 at 175% Scale, The graphics are clean and Tool-tips are showing at right position (not the best position at below mouse pointer).
    Just FYI and for any others, regarding PerMonitorV2 DPI-awareness. To properly test PerMonitorV2, one needs to change DPI while an app is running. Either change the DPI via system settings or drag to another monitor with a different DPI. When that happens, the app must rescale itself and all of its controls, while also changing control properties (as needed) for the new scale. Some controls are already DPI-aware and can change their own properties; while others/many aren't aware. Only at that point, after the scaling, can you determine how well the controls, and the app itself, are PerMonitor2 DPI-aware.

    Should go without saying that PerMonitorV2 awareness requires subclassing and a lot of extra code. If interested, I have a project in the codebank to play with: https://www.vbforums.com/showthread....ness-Framework
    Insomnia is just a byproduct of, "It can't be done"

    Classics Enthusiast? Here's my 1969 Mustang Mach I Fastback. Her sister '67 Coupe has been adopted

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {Unicode Open/Save Dialog} {Resource Image Viewer/Extractor}
    {VB and DPI Tutorial} {Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  21. #21
    Addicted Member
    Join Date
    Feb 2015
    Posts
    154

    Re: Charts controls with GDI+

    Quote Originally Posted by wqweto View Post
    Is this machine translated? This is like advising not to worry and to always destroy GDI objects & handles and everything will be ok. Until it's not ok because for one reason or another you miss on destroying everything which is the point. . . Anyway.

    Can you share with us how do you prevent leakage in GDI+? How do you detect it? Which perfmon counters do you use? Which API functions report outstanding handles or similar debug aides?

    cheers,
    </wqw>
    Sorry so long to come back to this.

    I have no concrete method of detecting leaks in GDI+, and I'm not sure that such a thing exists. When testing, I monitor memory & handle usage via Windows Task Manager and watch for excess usage and especially watch when my program terminates to make sure that used memory returns to prior values as much as possible.

    I also make sure that I destroy/delete all GDI+ objects etc. directly when done with them, and at program termination if needed which is also where I shut down GDI+ for that application. My programs always start and shut down GDI+ once only. I made a simple reusable GDI+ start/shutdown module to make it simpler for my needs.

    So those are the things which I do anyway, and it seems to work well so far. I'm honestly not aware of any other way.....
    Last edited by SomeYguy; Oct 31st, 2020 at 02:06 PM.

  22. #22
    Addicted Member
    Join Date
    Feb 2015
    Posts
    154

    Re: Charts controls with GDI+

    @LeandroA - These are excellent and very useful chart controls. Thank you very much!

  23. #23
    PowerPoster wqweto's Avatar
    Join Date
    May 2011
    Location
    Sofia, Bulgaria
    Posts
    5,093

    Re: Charts controls with GDI+

    Quote Originally Posted by SomeYguy View Post
    So those are the things which I do anyway, and it seems to work well so far. I'm honestly not aware of any other way.....
    There is another way and that is the way C++ and C# wrappers are implemented. They just use RAII technique and never worry about leaking handles.

    Anyway, monitoring GDI handles for GDI+ leakage makes no sense to me. Monitoring RAM usage has some merits as GDI+ allocator seems to be a "normal" one so its bitmaps are nothing more than large BLOBs in process space.

    My point is that using GDI+ is *very* dangerous, even more dangerous than the notorious GDI as there is no way to catch, monitor and prevent leaks.

    For instance the code in this thread has a lot of places where some leakage is suspected though just by looking at it I cannot tell if it leaks or when. For some snippets it look like it's possible to leak but whether the edge case is hit is not obvious and vice versa -- it might be leaking all the time and no one notices it.

    cheers,
    </wqw>

  24. #24
    Addicted Member sergeos's Avatar
    Join Date
    Apr 2009
    Location
    Belarus
    Posts
    162

    Re: Charts controls with GDI+

    1. I tried to transfer the user control ucChartArea to a new project, and if property of uc is
    LegendAlign = 0 - LA_TOP, then error occurs while form showing.

    Name:  nothing.JPG
Views: 1923
Size:  47.9 KB
    m_Serie is Nothing


    2. The next question is how to do the reverse operation:
    ucChartArea1.AddLineSeries
    - delete a any of one serie? or, remove all series?
    Ten Years After - 01 You Give Me Loving

  25. #25
    Junior Member
    Join Date
    Sep 2020
    Posts
    25

    Re: Charts controls with GDI+

    LeandroA - First let me say I'm very impressed with these controls! The appearance and features are just what I was looking for as I'm updating a program I wrote and wanted to replace the old chart control that came with VB6.

    I'm having an issue with the Area and Pie chart controls crashing (completely closing the program without any error message). The form has three chart controls on it and updates each of them every two to five seconds or so. I have it doing a .clear before updating the data each time for each of the controls and they pretty much always crash if the mouse is moved over (or left on top of) one of the controls but will also crash when the mouse is not. I've tested removing the ShowToolTips sub and the program will run longer (without that feature) but still crashes after a while.

    I've added a timer to your demo and then copied the coding from the load sub into the timer sub and added a .clear before it updates. I've set the timer to be quick so you can see how it crashes however you can change the timer it will just take longer to crash. If you run the attached demo and move your mouse around on top of the graph it should happen (try moving your mouse around in a circle over the graph while the graph keeps updating).

    Any help would be greatly appreciated!
    Attached Files Attached Files

  26. #26
    PowerPoster yereverluvinuncleber's Avatar
    Join Date
    Feb 2014
    Location
    Norfolk UK (inbred)
    Posts
    2,223

    Re: Charts controls with GDI+

    Crikey - superb gauges! I really want to do mine now in VB6.

    With regard to GDI+ leaking, I'd love to see a separate thread on that. My program is leaking like a sieve with only one hole, ie. slow but sure.
    https://github.com/yereverluvinunclebert

    Skillset: VMS,DOS,Windows Sysadmin from 1985, fault-tolerance, VaxCluster, Alpha,Sparc. DCL,QB,VBDOS- VB6,.NET, PHP,NODE.JS, Graphic Design, Project Manager, CMS, Quad Electronics. classic cars & m'bikes. Artist in water & oils. Historian.

    By the power invested in me, all the threads I start are battle free zones - no arguing about the benefits of VB6 over .NET here please. Happiness must reign.

  27. #27
    Junior Member
    Join Date
    Sep 2020
    Posts
    25

    Re: Charts controls with GDI+

    I did some more testing and this time it did produce an error instead of crashing. Here is a picture of the error and the location of the error.Name:  UcChartPieError.jpg
Views: 1381
Size:  31.1 KB

  28. #28
    Frenzied Member
    Join Date
    May 2014
    Location
    Kallithea Attikis, Greece
    Posts
    1,289

    Re: Charts controls with GDI+

    I fix your problem

    In user control ucPieChart, change one line in Sub Clear:

    ReDim m_Item(0)

    So you delete Preserve
    So the hpath is 0 in item 0. So new hpath produced


    And now your program run fine


    Also you can comment three lines in Timer1 in form1, to use the styles without resetting each 100ms
    'Me.cboLabelsPositions.ListIndex = 0
    'Me.CboLegendAlign.ListIndex = 0
    'Me.CboStyle.ListIndex = 0
    Last edited by georgekar; Oct 19th, 2022 at 04:06 PM.

  29. #29
    Junior Member
    Join Date
    Sep 2020
    Posts
    25

    Re: Charts controls with GDI+

    Quote Originally Posted by georgekar View Post
    I fix your problem

    In user control ucPieChart, change one line in Sub Clear:

    ReDim m_Item(0)

    So you delete Preserve
    So the hpath is 0 in item 0. So new hpath produced


    And now your program run fine


    Also you can comment three lines in Timer1 in form1, to use the styles without resetting each 100ms
    'Me.cboLabelsPositions.ListIndex = 0
    'Me.CboLegendAlign.ListIndex = 0
    'Me.CboStyle.ListIndex = 0
    Indeed you did! Thank you!!!

  30. #30
    Member
    Join Date
    Mar 2022
    Posts
    37

    Re: Charts controls with GDI+

    These look super cool!

    I'm trying to slowly integrate these into my app, but I can't seem to find a .Clear or .Reset in order to flush the uc back to nothing and then insert new data into it.

    I'm starting with the ucChartArea control.

    Thanks!

  31. #31
    PowerPoster
    Join Date
    Aug 2010
    Location
    Canada
    Posts
    2,401

    Re: Charts controls with GDI+

    Looks like Leandro missed it for ucChartArea (though ucPieChart, ucChartBar, and ucTreeMaps all have a Clear method). You can add this to the ucChartArea class:

    Code:
    Public Sub Clear()
        SerieCount = 0
        ReDim Preserve m_Serie(0)
        Me.Refresh
    End Sub

  32. #32

    Thread Starter
    Hyperactive Member
    Join Date
    Dec 2008
    Location
    Argentina
    Posts
    439

    Re: Charts controls with GDI+

    Hello, I don't think I updated the file here, it was already corrected from my blog, the function would be something similar to the one that jpbro put, only that you should call .refresh if you really need it.

    Code:
    Public Sub Clear()
        ReDim m_Serie(0)
        SerieCount = 0
        Set cAxisItem = New Collection
    End Sub
    leandroascierto.com Visual Basic 6 projects

  33. #33
    Member
    Join Date
    Mar 2022
    Posts
    37

    Re: Charts controls with GDI+

    Quote Originally Posted by LeandroA View Post
    Hello, I don't think I updated the file here, it was already corrected from my blog, the function would be something similar to the one that jpbro put, only that you should call .refresh if you really need it.

    Code:
    Public Sub Clear()
        ReDim m_Serie(0)
        SerieCount = 0
        Set cAxisItem = New Collection
    End Sub
    Got it!

    I went ahead and left the me.Refresh, as I don't when I would/wouldn't need it. My app shows the graph, then while refreshing data, creates another (new) graph for the changed data.

    Can you point me to where the Latest version is kept? I have found a few more bugs, namely:

    1. in Draw:

    Case LA_BOTTOM, LA_TOP (I had changed mine to use LA_TOP)
    With LabelsRect
    If SerieCount > 0 Then 'i added this IF to make sure there is data before running the next statement
    .Height = m_Serie(0).TextHeight + PT16 / 2 'm_Serie(0) doesn't exist if there's NO DATA yet!

    2. in Draw:
    change this:
    If cAxisItem.Count Then
    AxisDistance = (mWidth - mPenWidth) / (cAxisItem.Count - 1)
    End If

    to this, because I ran into cAxisItem.Count=1, which results in Div by Zero!
    If cAxisItem.Count <> 1 Then
    AxisDistance = (mWidth - mPenWidth) / (cAxisItem.Count - 1)
    Else
    AxisDistance = (mWidth - mPenWidth)
    End If

    3. in Draw, *just below* where #2 is, I inserted another IF because I ran into another Div by Zero:
    after this line:
    If SerieCount > 0 Then

    insert this IF:
    If m_Serie(0).Values.Count <> 1 Then
    PtDistance = (mWidth - mPenWidth) / (m_Serie(0).Values.Count - 1) 'original line -- Div by Zero if .Count=1

    4. in ShowToolTips:
    after this line:
    For i = 0 To SerieCount - 1

    insert this line:
    If i <= UBound(m_Serie) And ((mHotBar + 1) <= m_Serie(i).Values.Count) Then

    I believe I had to do this because there were more Values in some of the data sets, and as I was moving the mouse over to see data points Tips, there wasn't data that far out to the left.

    5. in ShowToolTips:
    BEFORE this line:
    sText = Left(sText, Len(sText) - 2)

    add this line, so we don't end up taking LEFT with ZERO length:
    If Len(sText) - 2 > 0 Then

    6. in ShowToolTips:
    after this line:
    With RectF

    add this IF to wrap .Left and .Top statements to make sure data is there, before we use it:
    If UBound(m_Serie(IndexMax).PT) >= mHotBar Then
    .Left = m_Serie(IndexMax).PT(mHotBar).x - SZ.Width / 2
    .Top = m_Serie(IndexMax).PT(mHotBar).Y - SZ.Height - 10 * nScale - TM
    End If

  34. #34
    Member
    Join Date
    Aug 2023
    Posts
    39

    Re: Charts controls with GDI+

    Hi

    A little fix to ucChartArea.ctl:

    Code:
    Public Property Get LegendVisible() As Boolean
        LegendVisible = m_LegendVisible
    End Property
    
    Public Property Let LegendVisible(ByVal New_Value As Boolean)
        m_LegendVisible = New_Value
        PropertyChanged "LegendVisible"
        Refresh
    End Property
    
    Public Property Get AxisXVisible() As Boolean
        AxisXVisible = m_AxisXVisible
    End Property
    
    Public Property Let AxisXVisible(ByVal New_Value As Boolean)
        m_AxisXVisible = New_Value
        PropertyChanged "AxisXVisible"
        Refresh
    End Property
    
    Public Property Get AxisYVisible() As Boolean
        AxisYVisible = m_AxisYVisible
    End Property
    
    Public Property Let AxisYVisible(ByVal New_Value As Boolean)
        m_AxisYVisible = New_Value
        PropertyChanged "AxisYVisible"
        Refresh
    End Property
    It has all the functions ready to work but the propierties are not public so they can't be used. With that code all works ok.

  35. #35
    Hyperactive Member
    Join Date
    Nov 2011
    Posts
    498

    Re: Charts controls with GDI+

    with all these fixes, can the OP update the origonal zip file to include the updates. tks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width