1
Answer

How the below code works

Photo of Ramco Ramco

Ramco Ramco

Mar 21
992
1

Hi

  How the below code works. 

Centrex is 24000

CentreY is 14000

Dim centerX As Integer
    Dim centerY As Integer
    centerX = Picture1.Width \ 2 ' Integer division to find the center along the X-axis
    centerY = Picture1.Height \ 2 ' Integer division to find the center along the Y-axis
    

    
    ' Capture the center of the original image and display it in Picture2
    Picture2.PaintPicture Picture1.Picture, 0, 0, 3500, 3500, centerX - 3500, centerY - 3500, 1500, 1500

Thanks

Answers (1)