OnScroll event example for C++ Builder
Before using this example you must add an Edit control to your form. Then, you can exercise this example by coding a command button that loads an image with the AutoScroll property set to True.
void __fastcall TForm1::Lead1Scroll(TObject *Sender, short sCode, int sPos, int sInc)
{
Edit1->Text = "Image origin: " + IntToStr((int)Lead1->DstLeft) +',' + IntToStr((int)Lead1->DstTop);
}