为图形分配“类型”

时间:2015-08-20 14:45:44

标签: vb.net

我对编程很新,所以请原谅我不是很技术性的。有没有办法让下面的代码行生成一个值,以便我可以为它指定一个名称?

Dim myGraphics as Graphics = Me.CreateGraphics
myGraphics.FillRectangle(myBrush, 0, 0, 300, 10)

例如,我希望代码是

topWall = myGraphics.FillRectangle(myBrush, 0 , 0, 300, 10) 

我知道我可以使用矩形代替这个,但我只是想知道是否有办法做到这一点。我希望这是有道理的。感谢您的帮助!

0 个答案:

没有答案