Hi everyone. I just begun programming with visual basic (6.0) and I need to develop an application for monitoring the results on an acquisition system. So I need to output a graph to the screen that will
continuously plot something as time goes forward. So I will
be constantly throwing in new data points, and I want these
data points plotted as soon as I throw them in. I know that there are many professional tools to do such kind of job but I cannot afford to spend hundreds of $ to so it. Furthermore I am trying to learn something and to develop the application myself. Can anyone help me in this regard ? The major problem I have found so far is that the picture kind of blinks when new data are trown in and the picture is updated. I am using standard graphical tools of VB6.0 and drawing curves in XOr mode in order to speed up the window update process... but it does not seem to be enough
Yeah, blinking can be a real problem when doing graphics in VB. One thing you might try is the old double-buffer technique. The idea is that you have two separate copies of the display (presumably two pictureboxes, in VB) and only one is visible at a time. You draw on the one which is hidden, then flip the two. Now that one is displayed, while you draw the next frame on theother one.
Can't recall whether I've ever actually used this technique or not. Most of my VB work is either just playing around, or developing apps for my own use at home or at work, so I end up just living with the flicker.
Incidentally, if you have MS Office then I believe you can use MS Chart from VB. There are probably plenty of other charting/graphing tools available without spending big bucks, but given the time, personally I prefer to do these things myself.
Also, I've just done a quick search on TheScripts for existing posts on the subject, and here's the first couple I found that looked as though they might be relevant. There are bound to be more, I didn't dig very deep.
Oh! According to
this link, I may have been wrong about needing MS Office.