Follow via:
RSS
Email Alert
Question
0 Votes
+ -

VB6: How to create new properties to the forms????

How to create new properties to the form apart from existing properties in its properties box????
Tags: off-topic
21st May 2012

Answers (1)

0 Votes
+ -
What do you mean, new propertise?
Are you talking about get and let?


What new property do you want to add?

'Return primitive, Variant can be changed to any primitive data type
Public Property Get PropertyName() As Variant
PropertyName = LocalVariable
End Property

Public Property Let PropertyName(ByVal vNewValue As Variant)
LocalVariable = vNewValue
End Property

'return object, key difference is the "set" keyword.
Private Property Get ObjectName() As Object
Set ObjectName = LocalObjectVariable
End Property

Private Property Let ObjectName(ByVal vNewValue As Object)
Set LocalObjectVariable = vNewValue
End Property
Updated - 22nd May 2012
Answer the question
Formatting +
BB Codes - Note: HTML is not supported in forums
  • [b] Bold [/b]
  • [i] Italic [/i]
  • [u] Underline [/u]
  • [s] Strikethrough [/s]
  • [q] "Quote" [/q]
  • [ol][*] 1. Ordered List [/ol]
  • [ul][*] · Unordered List [/ul]
  • [pre] Preformat [/pre]
  • [quote] "Blockquote" [/quote]

Join the TechRepublic Community and join the conversation! Signing-up is free and quick, Do it now, we want to hear your opinion.