-
Trying to convert a class module to a dll.
Error:
Private object modules cannot be used in public object modules
as parameteres or return types for public procedures, as
public data memebers, or as fields of public user defined
types.
Code:
Error is caused by this: How do I get around it. Without
it the resizing won't work.
Public Property Let Form(ByVal fPassForm As Form)
Dim iCount As Integer
Dim cControl As Control
Set fForm = fPassForm
' Store form's original Width & Height
lOriginalWidth = fForm.Width
lOriginalHeight = fForm.Height
' Use error trapping to ignore components that don't
' support certain properties being read at run-time
On Error Resume Next
' Store the form's component's properties
iCount = 0
ReDim aControls(fForm.Controls.Count)
For Each cControl In fForm.Controls
iCount = iCount + 1
With aControls(iCount)
If TypeOf cControl Is Line Then
.lLeft = cControl.X1
.lTop = cControl.Y1
.lWidth = cControl.X2
.lHeight = cControl.Y2
Else
.lLeft = cControl.Left
.lTop = cControl.Top
.lWidth = cControl.Width
.lHeight = cControl.Height
End If
End With
Next ' Each
End Property
-
Hi,
I think(!) that maybe you would be better off putting that code inside a function rather than a property, which might well be the cause of your problem.
Not 100% sure though.
Shaun
-
<?>
We'll try that now.
Thanks
:D
-
You cannot pass Specific Object Types to a Property, instead try Object or Variant, i.e.
Code:
Public Property Let Form(ByVal fPassForm As Object)
-
<?>
Thanks Aaron I'll give it a go .
-
<?>
Thanks Aaron
Code:
;) :)
:(
:D :D
:D :D
:D :D
:D :D :D :D