I can't find a solution to my problem.

Trying to use a function. I want to pass a PictureBox control to this function. I want this funciton to modify the PictureBox's graphics (Lines, Boxes, Circles, etc.) and then to return the PictureBox back to the form with it's new graphics.

This is what I thought should work. Any help, or solutions?

VB Code:
  1. Option Explicit
  2.  
  3. Function Update_Graphics(PicBox As Object) As Object    'Also have tried.. As PictureBox
  4.     PicBox.Cls                                          'This does not draw
  5.     PicBox.Scale (0, 0)-(50, 50)
  6.     PicBox.Line (0, 0)-(50, 50)
  7.    
  8.     Set Update_Graphics = PicBox
  9. End Function
  10.  
  11. Private Sub Command1_Click()
  12.     Dim objGraphics As PictureBox
  13.     Set objGraphics = Picture1
  14.     Set Picture1 = Update_Graphics(objGraphics)
  15.  
  16. '    Picture1.Cls                    ' This draws fine
  17. '    Picture1.Scale (0, 0)-(50, 50)
  18. '    Picture1.Line (0, 0)-(50, 50)
  19. End Sub

Thanks!