# 我就帮小吴回答了 ^_^

Posted by Sephiroth on July 12, 1999 at 14:34:30:

In Reply to: 请问小吴!! posted by 头儿 on July 10, 1999 at 14:45:42:

主要是 Optional 这个 Keyword, 看一个例子:

Public Sub Move2(Optional iLeft As Integer = 3000, Optional iTop As Integer = 2000, Optional iWidth As Integer = 4800, Optional iHeight As Integer = 3600)

Form1.Move iLeft, iTop, iWidth, iHeight

End Sub

Optional 是选择性引数, 等号后则是预设值. 只要注意不要把 Optional 的引数放在 ByVal/ByRef
的一般引数前面就可以了

Follow Ups:

- Re: 我就帮小吴回答了 ^_^ 头儿 09:39:05 7/14/99 (0)