kensheehimura1
Programmer
good day everybody, i have a problem in a class, i have a user defined type called RECT which got in the API viewer, i declared it inside the class, and declared it also as a parameter to the one procecure, but i recieve the error, the error is "Only Public user defined types defined in public object module or as a fields of public user defined types "
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Sub Draw(ByVal Width, ByVal Height As Long, ByVal SrcHdc As Long, ByVal PicBox As Object, ByVal Text As String, ByVal Textlength As Long, ByVal State As Long, byval r as RECT )
'code goes here
End Sub
how can i pass the user defined type as an argument, or how can i use it as a return value for a property like this
Public Property Get Lpdis() As DRAWITEMSTRUCT
Lpdis = mLpdis
End Property
tnx,
Private Type RECT
Left As Long
Top As Long
Right As Long
Bottom As Long
End Type
Public Sub Draw(ByVal Width, ByVal Height As Long, ByVal SrcHdc As Long, ByVal PicBox As Object, ByVal Text As String, ByVal Textlength As Long, ByVal State As Long, byval r as RECT )
'code goes here
End Sub
how can i pass the user defined type as an argument, or how can i use it as a return value for a property like this
Public Property Get Lpdis() As DRAWITEMSTRUCT
Lpdis = mLpdis
End Property
tnx,