|
-
Mar 27th, 2002, 05:34 PM
#1
Thread Starter
Lively Member
Grouping Functions Within an OCX
Hello Everyone, this is my first post, so i thought i'd say hi first )
Down to my problem now, I am writting an OCX which in the region of 50 Functions and a few subs so far, the final aim to have 100+ least thats how many Idea's i have left approx.....
The Functions will be in sets, the main sections at this point are like,
Code:
ControlName.FindWindowName
ControlName.FindLocateBox
ControlName.FindLocateName
ControlName.FindLocateAddress
and then there is the next step like
Code:
ControlName.GetWindowName
ControlName.GetLocateBoxText
ControlName.GetLocateName
ControlName.GetLocateAddress
I wanted to be able to group them at first i was thinking by Sections, like Locate, Profile then i determed, that i wanted to group them into like
Code:
ControlName.Get.FunctionName
ControlName.Find.FunctionName
ControlName.Set.FunctionName
Much like u can with a text box and
Code:
text1.font.bold = true
and Both the above work but u have the option of grouping them like
Code:
Text1.Font.Italic
Text1.Font.Bold
Text1.Font.Underline
The order is like ControlName.Group.Function...
I have thought about this, i thought maybe a custom data type, but then they dont really cover this area, Then i thought using an Enumerate, and then i was told collections are the way to do this...
Can this be done in VB or is this a C thing or can it be done in VB ?
Thanks For the help, Im finding out alot just by reading some of the other topics, stuff i hadn't even thought of but i think will be useful...
______
Steve
-
Mar 27th, 2002, 06:37 PM
#2
-= B u g S l a y e r =-
Hi Cenobitez,
add a class module for each group.
add the functions to the classes where they belong.
in u'r usercontrol, add a public varialble for each group, with the name u want to show up when the user hit .
this way u will have code like u wanted.
If u need me to elaborate on this subject, let me know.
-
Mar 27th, 2002, 07:05 PM
#3
Thread Starter
Lively Member
Thanks Peet, Let me have a play, if i have no luck then il ask for more, sometimes a shove in the right direction is better than being given it on a plate 
_____
Steve
-
Mar 28th, 2002, 04:22 AM
#4
-= B u g S l a y e r =-
Ok
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
|