|
-
August 14th, 2001, 04:20 PM
#1
How to add a function to an activex component?
I stole an activex component that I am tying to moodify
so that I can build an ocx component to be slammed into
my C++ code.
Function
private Sub UserControl_InitProperties()
was already there.
When I tried to add (Declarations area of the UserControl)
public Sub UserControl_Initialize(FileName as string, _
DirFullPath as string, TBD as string)
So that I can call it (UserControl_Initialize) in my C++
code and pass in info, I get a compile error
"Procedure declaration does not match description of event
or procedure having the same name"
What I am I doing wrong?
'Initialize Properties for User Control
private Sub UserControl_InitProperties()
set Font = Ambient.Font
End Sub
' added to be exposed in c++ code and pass in values
public Sub UserControl_Initialize(FileName as string, _
DirFullPath as string, TBD as string)
'public Sub UserControl_Initialize()
Dim sFile as string
Dim tFile as string
' MsgBox "Filepath='" & sFile & "'" & vbCr & "FileTitle='" & tFile & "'"
Call startWord(sFile, tFile)
End Sub
-
August 15th, 2001, 09:09 AM
#2
Re: How to add a function to an activex component?
You cannot declare the initialize function as public. This is an event fired by the control to the container( your VB control is the container in this case ); which cannot be public.
Jim Hewitt
Software Developer
Liberty Tax Service
www.LibertyTax.com
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
|