Custom Properties in VB Control 
Author Message
 Custom Properties in VB Control

Hello,

I am trying to create an ActiveX Control that has a custom
property.  I want this property to be able to be set like the
other ambient properties from the HTML page using the
<PARAM> tags.  I would appreciate any help on creating
such a control that could read a custom property set by the HTML
page in VB5.

My thinking was... In the HTML
==================================
<object...>
    <PARAM NAME="CustomProperty" VALUE="xyz">
</object>

And in the VB Code...
==================================
Public CustomProperty As String

Private Sub UserControl_Click()
    UserControl.txtTest.Text = UserControl.CustomProperty
End Sub

Thus hopefully setting the textbox on the ActiveX Control = "xyz"

I am new to VB shooting in the dark... Help Greatly Appreciated!

Thank You,
Damon Regan



Sat, 01 Jul 2000 03:00:00 GMT  
 Custom Properties in VB Control

Hello Damon,

Read about property Get/Let and Set in VB help. They are easy to understand
and use and will to exactly what you are lookin for.

Best regards

Erik



Sat, 01 Jul 2000 03:00:00 GMT  
 Custom Properties in VB Control

The fastest way to get started is to use the ActiveX Control Interface
Wizard from VB's add-in menu.
It's not that controls are terribly difficult, it's just that there is a lot
you can do with them. And, there are little details you might miss by just
trying it out on your own at first.
The wizard walks you right through setting up all your properties and
methods.
Just make sure you have a Usercontrol in your project and that if you are
using any constituant controls (controls inside you control) they are on the
form before you strat the wizard.

-Rob

Quote:

>Hello,

>I am trying to create an ActiveX Control that has a custom
>property.  I want this property to be able to be set like the
>other ambient properties from the HTML page using the
><PARAM> tags.  I would appreciate any help on creating
>such a control that could read a custom property set by the HTML
>page in VB5.

>My thinking was... In the HTML
>==================================
><object...>
>    <PARAM NAME="CustomProperty" VALUE="xyz">
></object>

>And in the VB Code...
>==================================
>Public CustomProperty As String

>Private Sub UserControl_Click()
>    UserControl.txtTest.Text = UserControl.CustomProperty
>End Sub

>Thus hopefully setting the textbox on the ActiveX Control = "xyz"

>I am new to VB shooting in the dark... Help Greatly Appreciated!

>Thank You,
>Damon Regan




Sat, 01 Jul 2000 03:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. How to Add custom properties to VB Controls?

2. Custom Properties in VB Control

3. VB6: Property Sheets Bug?, Custom Controls and properties

4. VB 6 ActiveX Control in Windos Form, can't access any custom properties

5. VB calles every Property Get on my Custom Control

6. Custom Property changes in Custom Outlook Form

7. Q: Create custom property on form/report controls ?

8. Custom Control Properties

9. Custom Control Property Problem

10. Custom Web Control Collection Property

11. How do I debug properties of custom controls?

12. Custom Control Property Problem

 

 
Powered by phpBB® Forum Software