How to save current pic of PictureBox VB6 control and compare it with new pic?
Posted on 2011-09-08
I have a picture control with VB6 desktop application. I pass his hWnd to a OCX which put picture in it. Actually a OCX provide me with preview of played video. But in 5-10 min. it block and show empty (black screen). Of course, first plan are to check the OCX, but it is on C and rule external device which it not under my control,also it may be driver problem . A possible solution is to do workaround and to restart the control, then it continue fine. But I should detect that there is no change in picture last 2 or 5 sec.
So the question is: how to save current picture from PictureBox control and how to compare it after 2 sec. May be I need to get bytes of current pics and to compare it with old bytes? Only count of bytes, or to make some fast check sum over it? Give me advice please.
I prefer to do this without save picture to file and check bytes of files, as it is slow and I'm sure all can be solved in memory only.
For C experts, if you give me idea about API fuctions may be I'll be able to call it from Vb6.