Hi
In below code i want to save img variable. Below is the code
Dim img As StdPicture
Set img = LoadPicture(App.Path & "O" & TrNo & Format(Date, "ddmmyyyy") & ".jpg") ' Load your image here
Dim lSourceX As Long, lSourceY As Long
Dim lOldWidth As Long, lOldHeight As Long
Dim lNewWidth As Long, lNewHeight As Long
lOldWidth = Picture1.ScaleWidth \ Screen.TwipsPerPixelX
lOldHeight = Picture1.ScaleHeight \ Screen.TwipsPerPixelY
lNewWidth = lOldWidth * 0.7
lNewHeight = lOldHeight * 0.7
lSourceX = (lOldWidth - lNewWidth) \ 2
lSourceY = (lOldHeight - lNewHeight) \ 2
img.Width = img.Width - img.ScaleWidth + (lNewWidth * Screen.TwipsPerPixelX)
img.Height = img.Height - img.ScaleHeight + (lNewHeight * Screen.TwipsPerPixelY)
Thanks