Type definitions must go in a Module.
Once defined, you should declare a variable of that
type, i.e.,
Type POINTAPI
x as Long
y as Long
End Type
Dim pointdata as POINTAPI
or
Global pointdata as POINTAPI
Quote:
> Hi all
> Hope someone can help i am quite new to vb and i dont understand
> where to use type definitions
> this is what i am trying to do
> i want to display the cursor position cordinates
> so i declare this : Declare Function GetCursorPos Lib "user32.dll" (ByVal
> lpPoint As POINTAPI) As Long
> in my general declarations of my form.
> but where do i use type to declare the POINTAPI type i use this
> Type POINTAPI
> x As Long
> y As Long
> End Type
> But where in the code should it go? on the form in a bas module or what??
> Thanks Andy