E enonod Well-Known Member Licensed User Longtime User Dec 21, 2011 #1 If I have cvsA and cvsB as Canvases and wish to pass them in turn to a Sub that draws on each, can I use... Sub Draw(fred) Rect1.Initialize(x,y, etc) fred.DrawRect(Rect1, etc) ... End Sub such that fred can be either canvas? Not being the result of an action I cannot distinguish by using sender. Thank you
If I have cvsA and cvsB as Canvases and wish to pass them in turn to a Sub that draws on each, can I use... Sub Draw(fred) Rect1.Initialize(x,y, etc) fred.DrawRect(Rect1, etc) ... End Sub such that fred can be either canvas? Not being the result of an action I cannot distinguish by using sender. Thank you
stevel05 Expert Licensed User Longtime User Dec 21, 2011 #2 You'll need to define the Sub as Sub Draw(fred As Canvas) But yes it should work. Upvote 0
E enonod Well-Known Member Licensed User Longtime User Dec 21, 2011 #3 Thank you for that and yes I would have forgotten the As Canvas. Upvote 0