I have a module containing several functions which are used for testing. The following is an example of one of the functions:
As you can see in this I am referring specifically to form1. However I need to be able to pass the form as a parameter to the function so I can use it on multiple forms.Code:Public Function IsEmpty(ByVal TestPosition As Microsoft.Xna.Framework.Point) As Boolean TestPosition.X = (TestPosition.X + BlockSize - 515) / BlockSize - 1 TestPosition.Y = (TestPosition.Y - 213) / BlockSize - 1 If TestPosition.X >= 0 And TestPosition.Y >= 0 And TestPosition.X < 10 And TestPosition.Y < 15 Then If Form1.Blocks(TestPosition.X, TestPosition.Y) Is Nothing Then Return True Else Return False End If End If End Function
Any help appreciated![]()




Reply With Quote