Results 1 to 3 of 3

Thread: Problem in exporting picturebox with shape to a bmp (*Resolved*)

Threaded View

  1. #1

    Thread Starter
    Member
    Join Date
    Jul 2004
    Posts
    36

    Problem in exporting picturebox with shape to a bmp (*Resolved*)

    I have a problem here. I have a picturebox with several shape on it, and a label. I want to save picturebox to a bitmap just as it is.

    I used the following codes but what I got is an empty picture without anything on it. Anyone has idea what I missed?


    -------------------------------------------------------

    Private Sub Form_Load()


    Dim intIndx As Integer

    Picture1.AutoRedraw = True

    'Load shapes
    shpBox.BorderColor = RGB(255, 255, 255)
    shpBox.shape = vbShapeOval
    shpBox.FillColor = RGB(0, 0, 0)
    shpBox.FillStyle = vbFSSolid
    shpBox.Width = 1500
    shpBox.Height = 500

    Set shpBox.Container = Picture1

    For intIndx = 0 To 3
    shpGreen(intIndx).FillColor = RGB(0 + 50 * intIndx, 255, 0 + 50 * intIndx)
    shpGreen(intIndx).FillStyle = vbFSSolid
    ' shpGreen(intIndx).FillStyle = 2 + intIndx
    Next intIndx


    For intIndx = 0 To 3
    shpRed(intIndx).FillColor = RGB(255, 0 + 50 * intIndx, 0 + 50 * intIndx)
    shpRed(intIndx).FillStyle = vbFSSolid
    ' shpRed(intIndx).FillStyle = 2 + intIndx
    Next intIndx

    For intIndx = 0 To 3
    shpBlue(intIndx).FillColor = RGB(0 + 50 * intIndx, 0 + 50 * intIndx, 255)
    shpBlue(intIndx).FillStyle = vbFSSolid
    ' shpBlue(intIndx).FillStyle = 2 + intIndx
    Next intIndx

    Label1.Caption = "This is a test image"


    End Sub


    Private Sub cmdExport_Click()

    SavePicture Picture1.Image, App.Path & "\Accom_data\test1.bmp"
    End Sub


    Thank you in advance
    Last edited by Elysees; Jul 9th, 2004 at 09:49 AM.

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