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

Modified

 

Public Sub DrawInit(frmHost as Form, iCustomWidth as Integer, iCustomHeight as Integer, bCollisionCheck as Boolean, bCopy as Boolean)

  • Use this routine to initialize the ASpriteNET control.

  • frmHost - The form that contains the GameWindow control.

  • iCustomWidth - A custom width for the foreground screen (viewable screen)

  • iCustomHeight - A custom height for the foreground screen (viewable screen)

  • bCollisionCheck - Set this to False to bypass collision checking.  Set it to True to implement collision checking.

  • bCopy - Added in Version 2.2, if set to True, it allows you to redraw a portion of the background using the original background bitmap by making a copy of the original bitmap, which is used later when using the new DrawRedrawBackground function.  Setting it to False won't make a copy of the original bitmap, which means that extra memory isn't used by having an extra bitmap "copy" made.

Comments:  You must call DrawInit before any other methods are called.  Changes to this method are:

  • The iCustomWidth and iCustomHeight parameters have now been implemented.  See the example below.

  • The bCollisionCheck parameter allows you bypass collision checking if set to False.  To implement collision checking, set this value to True.  You can change this value later by calling the DrawFlipBackBuffer method.

Example of setting up your GameWindow:

'Create the Game Window

GameWindow1 = New GameWindow

Me.Controls.Add(GameWindow1)

With GameWindow1

    .Size = New Size(Me.Width, Me.Height)

    .Left = 0

    .Top = 0

    .DrawInit(Me, Me.Width, Me.Height, True, True) 'NOTE the Me.Width, Me.Height parameter changes (previously 0)!!!!!!!!!!!!!!!!!!

End With