Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.
passing a picturebox as an argument
I'm trying to learn some Delphi
I know how to code in VisualBasic6
I just want to write down some routines that I might use again and again.
In VB6 I would write
sub drawGrid(pict as picturebox, x as integer, y as integer)
code to draw the grid overhere (just y+1 horizontal and x+1 vertical lines)
I managed to draw a grid within a unit that belongs to the form itself, but now i want to write down the same code in a general way
So I want to pass the object were I draw on as an argument.
next I want to write doen
pict.canvas. etcetera to draw the grid
but it just didn't work.
Hope this question is clear and hope someopne is able to explain what I should do. Lots of thanks to those helpfull
0 · ·