自定义控件怎么设置默认属性


自定义控件如何设置默认属性
自己编写一个控件,怎么设置默认属性?
像TextBox的text,label的caption属性那样

VisualBasic程序开发环境 程序开发 VisualBasic

noface 12 years ago


要知道,在vb中使用默认属性是一种不好的习惯!

一身正气满青楼 answered 12 years ago



iRoy930 answered 12 years ago


我想是楼主表达的意思不对,但是他的说法是对头的

Stella丶 answered 12 years ago


dim PCaption as string

public property let Caption(value as string )
PCaption=value
end property
public property get Caption() as string
if PCaption= " " then PCaption= "我是默認值 "
Caption=PCaption
end property


.瓶诘妖精。o answered 12 years ago

Your Answer