Results 1 to 2 of 2

Thread: Picture boxes

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2001
    Posts
    4

    Smile

    Hoping you can help me out on this one!!!!!
    I have drawn a graph on one form (frmnodes) & when the form is unloaded during run time I want that picture (picbox) to automatically come up on my startup form (frmanalyse). This should be a simple matter of loading it but I can't quite manage it.
    Any help is much appreciated!!!!!

  2. #2
    Addicted Member
    Join Date
    Aug 2000
    Location
    Croatia
    Posts
    200
    You need to set the AutoRedraw property of frmNodes to TRUE, then put this code in frmNode:

    Code:
    Private Sub Form_Unload()
    
    ' Load the startup form
    frmAnalyse.Show
    
    ' Copy the form's picture to a PictureBox located on startup form
    Set frmAnalyse.picBox.Picture = Me.Image
    
    ' Clean up
    Set frmNode = Nothing
    
    End Sub
    This should do the trick, although I'm not running VB, and therefore cannot check if this code will work properly. Anyway, if this fails, try putting the "frmAnalyse..." and "Set frmAnalyse.picBox..." lines in Form_QueryUnload event.

    Hope this is what you wanted!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width