|
-
Aug 20th, 2018, 07:18 AM
#1
Thread Starter
Member
How to implement events in - _and_ outside of - a usercontrol array?
Hi everyone,
In a VB6 application I have to replace every ancient Sheridan SSRibbon control by a usercontrol "NewSSRibbon". The main form contains both SSRibbons in a control array and "stand alone" SSRibbons with an empty Index property.
I have to implement the Click event in NewSSRibbon so that both handler signatures Sub btnNewSSRibbon1_Click() and Sub btnNewSSRibbon2_Click(Index As Integer) work.
Declaring something like Public Event Click() next to Public Event Click(Index As Integer) obviously causes a compile error. "Optional Index As Integer" is not allowed.
In addition, if this problem can be solved: how do I provide the correct Index? In Public Event Click(Index As Integer), Index is merely a placeholder. It doesn't refer to anything, which doesn't look right to me.
And what would the RaiseEvent Click - statements look llike?
How do I go about it?
Thanks in advance!
Cooz
Tags for this Thread
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
|