|
-
Sep 22nd, 2000, 06:52 AM
#1
Thread Starter
Member
Hi,
I have created an ocx object that I can use and load into a from within another of my vb-projects.
But what I want to do is to dynamically create a visible instance of my ocx-object.
Is there anyone out there who can give me some advise?
Thanks,
-
Sep 22nd, 2000, 08:34 AM
#2
You could try creating a control array of one copy of them in design mode which is invisible. Then you could add new copies when you want them via code and set the positions on the form as needed.
-
Sep 25th, 2000, 07:34 AM
#3
Thread Starter
Member
Thanks, that helped me to do what I needed to do.
Here is my solution and piece of code to dynamically create instances of my ocx object incase anyone else ever has the same problem.
In design mode I placed an invisible copy of my ocx-object.
Then this piece of code creates the instances.
'Load a new instance of the PresentationSheet into the control array
Load PresSheetObj(intI)
PresSheetObj(intI).Visible = False
'Set the properties for the instance and retrieve the data
PresSheetObj(intI).mstrViewID = mPresType(intI, 0)
PresSheetObj(intI).mlngEvalID = mlngEvalID
PresSheetObj(intI).mintLangID = mintLangID
PresSheetObj(1).Left = mlngLeft
PresSheetObj(1).Top = mlngTop
PresSheetObj(intI).RetrieveData
This worked fine for me.
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
|