Results 1 to 6 of 6

Thread: a picture box question

  1. #1

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    ok I've got a picture box, and on that picture box is an image box, and 3 labels, is there a way that when you save the picture box the labels and image are saved on that picture?

    also is there a way to flip a label on its side?

    thanx

    ------------------
    Mooose

  2. #2

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    ok no one seems to know the answer to that question so is there a way to atleast pring an image box, and labels onto another picture and still keep that picture there too?

    ------------------
    Mooose

  3. #3

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    well does anyone know how to capture a certain area on the screen or on a form a bit like the print screen statement but only capturing a certain area?

    ------------------
    Mooose

  4. #4
    Guru Aaron Young's Avatar
    Join Date
    Jun 1999
    Location
    Red Wing, MN, USA
    Posts
    2,176

    Post

    Place a 2nd Picturebox on the Form:
    Code:
    Private Declare Function BitBlt Lib "gdi32" (ByVal hDestDC As Long, ByVal x As Long, ByVal y As Long, ByVal nWidth As Long, ByVal nHeight As Long, ByVal hSrcDC As Long, ByVal xSrc As Long, ByVal ySrc As Long, ByVal dwRop As Long) As Long
    Private Const SRCCOPY = &HCC0020
    
    Private Sub Form_Load()
        With Picture2
            .Visible = False
            .Width = Picture1.Width
            .Height = Picture1.Height
            .AutoRedraw = True
        End With
    End Sub
    
    Private Sub Command1_Click()
        With Picture1
            BitBlt Picture2.hDC, 0, 0, ScaleX(.ScaleWidth, .ScaleMode, vbPixels), ScaleY(.ScaleHeight, .ScaleMode, vbPixels), .hDC, 0, 0, SRCCOPY
            Picture2.Picture = Picture2.Image
        End With
        SavePicture Picture2.Image, "C:\Saved.bmp"
    End Sub
    ------------------
    Aaron Young
    Analyst Programmer
    aarony@redwingsoftware.com
    ajyoung@pressenter.com


  5. #5

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    thanx for tryin to help aaron but the image that is saved is blank, it not saving any of the picture, what I want is for it to save the picture in the picture box the image that is on part of the picture box, and the labels that are on part of the picture box as one image.

    ------------------
    Mooose

  6. #6

    Thread Starter
    Member
    Join Date
    Jan 2000
    Location
    Launceston, Tasmania, Australia
    Posts
    44

    Post

    ooops sorry the codes working great now.. thanx a million aaron I missed out part of the code sorry.

    ------------------
    Mooose

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