You have to keep your data in a buffer (array) that is as big as the number of points you want to simultaneously display or remember (at least the pixel width of your picture box). Update the buffer after every sample and redraw it. When the buffer is full, either shift it one step to discard the oldest data or implement it as a ring buffer with pointers to start and end and take care of wrapping. Another option is to scroll the contents of the window -1 pixel, one pixel to the left before you draw the new sample at the rightmost position in the picture box. There is an API function called ScrollWindow (or ScrollWindowEx) that does this, I don't know the VB name for it (I use VC++ not VB). The advantage with the first one is that the display can be redrawn any time and keep the old data (if the window is minimized and then maximized, or covered and then uncovered by other windows for example). Another advantage is that you can keep more samples than will fit in the display and bring it back with horizontal scroll bars. Hope this helps. Ruben > Hello List! > Any experts in VB out there? the problem is that how to scroll a graph > being displayed in PictureBox ,I want to keep the graph scrolling when it > reach to the end of the PictureBox and not to start from the beginning .... I > have checked the web for some free VB code, there was an example about how to > scroll a pic. in the PictureBox by using the scroll bar but nothing about how to > scroll dynamic data(I am displaying the data of 5 AD Ch. continously ).... any > ideas, comments , code please. > Regards, > Salah. > > ----- Original Message ----- > From: "Adam Smith" > To: > Sent: Saturday, June 22, 2002 8:58 AM > Subject: Re: [OT]: Comms in VB 6 > > > > Better yet, go to www.planet-source-code.com and search for something to > > the effect of "serial interface" (or you might just try "serial")... > > > > Cheers, > > Adam > > > > > -----Original Message----- > > > From: adam-request@viratech.com [mailto:adam-request@viratech.com] On > > > Behalf Of Mike Singer > > > Sent: Friday, June 21, 2002 7:06 PM > > > To: PICLIST@MITVMA.MIT.EDU > > > Subject: Re: [OT]: Comms in VB 6 > > > > > > . > > > Search MSDN with "MSComm Control" keyword. > > > Or search Disk C: with "VBREF98.CHM": > > > C:\Program Files\Microsoft Visual Studio\MSDN... > > > > > > Mike > > > (if possible, change reply-to address to Piclist) > > > > > > > > > > Mike, > > > > > > > > Thanks for the reply. I have MSDN installed but I have not > > > > seen VBREF98.CHM. > > > > Where would I find this ? > > > > > > > > Thanks. > > > > > > > > Regards > > > > > > > > David Huisman > > > > > > > > > > > > > David Huisman wrote: > > > > > > Can someone point me where I could find some help with MScomm > > > > > > component for VB6. I need to transfer non-ASCII data and want > > > > > > to set the message type to InputModeBinary. > > > > > > > > > > You absolutely need MSDN, installed on your computer, > > > > > particularly "VBREF98.CHM" book. In the chapter > > > > > "Controls reference" - "ActiveX controls" this book has > > > > > a lot of documentation to "MSComm Control" with examples. > > > > > > > > > > Good luck. > > > > > Mike. > > > > > > -- > > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > -- > > http://www.piclist.com hint: PICList Posts must start with ONE topic: > > [PIC]:,[SX]:,[AVR]: ->uP ONLY! [EE]:,[OT]: ->Other [BUY]:,[AD]: ->Ads > > > > > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > ============================== Ruben Jvnsson AB Liros Electronic Box 9124, 200 39 Malmv, Sweden TEL INT +46 40142078 FAX INT +46 40947388 ruben@pp.sbbs.se ============================== -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu