如何为笔刷参数指定默认值 [英] how to assign default value for brush parameter
本文介绍了如何为笔刷参数指定默认值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
私人子DrawNote(ByVal hIndex为Short,
可选的ByVal oBrush As Brush = Brushes.Black)
可选的ByVal oBrush As Brush = Brushes.Black''不写
tnx
Private Sub DrawNote(ByVal hIndex As Short,
Optional ByVal oBrush As Brush = Brushes.Black)
Optional ByVal oBrush As Brush = Brushes.Black ''does not word
tnx
推荐答案
查看此内容 http://www .vbforums.com/showthread.php?t = 647265 [ ^ ]
而此 http://www.xtremevbtalk.com/showthread.php?t=318853 [ ^ ]
Brushes.Black是只读属性,并且需要一个常量表达式
Check this out http://www.vbforums.com/showthread.php?t=647265[^]
and this http://www.xtremevbtalk.com/showthread.php?t=318853[^]
Brushes.Black is a read only property and a constant expression is required
这篇关于如何为笔刷参数指定默认值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文