ViewPortLeft, ViewPortTop
These two properties tell you what part of a form is currently visible. Well, actually, they tell you where the visible part starts—you need to combine them with some others to figure out the whole visible portion.
Usage |
nVisibleLeft = frmForm.ViewPortLeft nVisibleTop = frmForm.ViewPortTop |
Example |
* A control can figure out whether it can be seen IF NOT BETWEEN(This.Left,ThisForm.ViewPortLeft, ; ThisForm.ViewPortLeft + ThisForm.Width) * Hmmm, I can't be seen. What should I do? * I know. I'll be obnoxious! MESSAGEBOX("Hey, you can't see me! Try scrolling.", 64, ; This.Name) ENDIF |
See Also |
Form, Height, SetViewPort, ViewPortHeight, ViewPortWidth, Width |