|
Thread: <?>
-
Sep 28th, 2000, 08:43 AM
#1
Thread Starter
_______
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
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 28th, 2000, 08:55 AM
#2
Addicted Member
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
Web/Application Developer
VB6 Ent (SP5), Win 2000,SQL Server 2000
-
Sep 28th, 2000, 08:58 AM
#3
Thread Starter
_______
<?>
We'll try that now.
Thanks
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 28th, 2000, 11:29 AM
#4
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)
-
Sep 28th, 2000, 11:37 AM
#5
Thread Starter
_______
<?>
Thanks Aaron I'll give it a go .
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Sep 28th, 2000, 12:00 PM
#6
Thread Starter
_______
<?>
Thanks Aaron
Code:
;) :)
:(
:D :D
:D :D
:D :D
:D :D :D :D
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|