Hi Matt,
I just realize that in VFP9 you can retrieve values using combination of SYS(2600) and CTOBIN(). For example you can replace
lnMaxSizeX = loWas.Long2NumFromBuffer(lParam+8)
lnMaxSizeX = CTOBIN((SYS(2600,lParam+8,4), "RS")
The BINTOC() can handle conversion in opposite direction
lcNewMinMax = BINTOC(lnMinTrackSizeX, "RS") + ;
BINTOC(lnMinTrackSizeY, "RS") + ;
BINTOC(lnMaxTrackSizeX, "RS") + ;
BINTOC(lnMaxTrackSizeY, "RS")
Let me know if it works for you.
>My mistake. I read through your example and understand it much better now and it's working exactly as I'd hoped it would. To explain the "why" a bit - I'm applying constraints on the height and width of the form, based on what edge or corner of the screen the user is resizing. Because the controls inside the form are anchored to resize with the form, I want to keep the user from extending the window (and inner controls) in either dimension beyond a certain aspect ratio. In other words, I want to prevent them from making the screen look really ugly <g>.
>
>This was the last piece I needed to be able to do this. I tried setting Thisform.MaxWidth and ThisForm.MaxHeight inside the the event bound resizing, but that isn't imposed until after the resize is done. This actually interrupts it and sets it during the resize, which is perfect.
>
>Thanks again, Sergey.
>
<snip>
--sb--