Rene,
Make a normal Windows proc ( (string),real ), pass it the image and use the following code (after open the window) to obtain the ratio:
0{prop:hide}=true
if exists(pFile) and inlist(right(clip(pFile),3),'jpg','bmp','gif')>0
?Image{Prop:NoWidth} = true
?Image{Prop:NoHeight} = true
?Image{prop:text}=pFile
Ancho$ = ?Image{Prop:Width}
Alto$ = ?Image{Prop:Height}
?Image{Prop:Width} = 50
?Image{Prop:Height} = 50 * Alto$ / Ancho$
If ?Image{Prop:Height} > 50
?Image{Prop:Height} = 50
?Image{Prop:Width} = 50 * Ancho$ / Alto$
End
loc:Ratio=Alto$ / Ancho$
else
loc:ratio=1
end
post(event:closewindow)
Hope this helps
Alberto