Prosurv cEZ, Prosurv CE and Prosurv PC - Land Surveying Data Collection

Prosurv Pocket Quads™ & Prosurv Imaging™ - 7.5' USGS Topo Quad Sheet Software

Call 888-647-9500 Toll-free or e-mail us at sales@prosurv.com  today!

Hit Counter

 

ASprite.NET Version 2.0.0.0

Overloaded

 

Public Sub DrawBackgroundScrollSetOffsets(iOffsetX as Integer, iOffsetY as Integer, ByRef bMaxX as Boolean, ByRef bMaxY as Boolean)

  • iOffsetX - The X offset to scroll to.

  • iOffsetY - The Y offset to scroll to.

  • bMaxX - Returns True if the iOffsetX value is greater than the width of the Background image (entire bitmap width), otherwise returns False.  Use this to automatically reset your scrolling to zero as shown in the example below.

  • bMaxY - Returns True if the iOffsetY value is greater than the height of the Background image (entire bitmap height), otherwise returns False.  Use this to automatically reset your scrolling to zero as shown in the example below.

Public Sub DrawBackgroundScrollSetOffsets(iOffsetX as Integer, iOffsetY as Integer)

  • iOffsetX - The X offset to scroll to.

  • iOffsetY - The Y offset to scroll to.

Example:

In a Timer event you could do the following:

 

ScrollX = ScrollX + 5

ScrollY = ScrollY + 5

GameWindow1.DrawBackgroundScrollSetOffsets(ScrollX, ScrollY, MaxX, MaxY)

If MaxX Then

    ScrollX = -5

End If

If MaxY Then

    ScrollY = -5

End If