Partial Graph
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Thread: Partial Graph

  1. #1
    Join Date
    Jun 2010
    Posts
    2

    Unhappy Partial Graph

    Hello,
    I have a program made in Visual Basic 6 which does some data logging and display the result on a graph. This program is running on different computer and work quite well, unfortunately I have been reported; on one of the computer the graph is only displayed partially.

    I was wondering if any of you have already come across this problem?
    I'm not sure where is the problem as the program is the same on the different computer, I was thing maybe an update could cause this or different driver.

    So far I tried rebuilding and reinstalling the application without success no change.
    I tried replacing the computer but kept the same hard drive, same thing again.
    Now I'm going to reinstall everything, windows ...

    If any of you have any idea about what could cause this problem I would be glad to hear it.

    I attached a screenshot of the display, we can see the graph stop drawing after 10, but is variable sometime it will be between 8-10 and continue.
    As I was able to take the screenshot, I assumed it ain't hardware.
    Attached Images Attached Images  

  2. #2
    Join Date
    Jan 2006
    Location
    Chicago, IL
    Posts
    14,960

    Re: Partial Graph

    You aren't scaling the graph. Print out the X values, and you'll see the problem.
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jun 2010
    Posts
    2

    Re: Partial Graph

    I forgot to say the problem is intermittent, I'v only seen it once, but seems to appear quite often.

    Unfortunately, the code is not mine, I'm just getting through the code for some modification and trying to understand this glitch.

    Here is a small snip of the code:

    Code:
    Sub Screen_plot_all()
    Dim oysc As Double
        ymax(1) = 9 * ysr: ymax(2) = 3.6: ymax(3) = 18 * ysc
        Call screen_graph
        For testno = 0 To 14
            If LoadTest.Check3D1(testno).Value And rbPlot(Int(testno / 3)) Then
                Call set_scaling
                Call Screen_plot
            If testno = 0 And pbCLZ Then
                oysc = ysc
                Call set_scaling
                Call Screen_plot
                End If
            End If
        Next
        'ccsmod v8.8
        testno = 15
        If LoadTest.Check3D1(testno).Value Then
            Call set_scaling
            Call Screen_plot
            End If
    End Sub

  4. #4
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,722

    Re: Partial Graph

    Well, this code does not say much.
    Maybe the problem is in the scling. So the procedure set_scaling could be of interest.
    Has it probably to do with the screen resolutiion?
    Compare screen resolutions on machines where display is ok with machines where it isn't.

  5. #5
    Join Date
    Jun 2010
    Posts
    2

    Re: Partial Graph

    One thing that comes to mind is that in case the graph is drawn on a picturebox control, you should set the "autoredraw" setting to "true" for that box, and after the graph has been drawn you should call picbox.refresh (replace with the name for the control).
    I hope this helps.

    There could also be a problem with the math of the scaling function.

Tags for this Thread

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center