Click to See Complete Forum and Search --> : a picture box question
mooose
Jan 25th, 2000, 05:13 AM
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
mooose
Jan 25th, 2000, 08:46 PM
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
mooose
Jan 26th, 2000, 07:14 AM
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
Aaron Young
Jan 26th, 2000, 07:54 AM
Place a 2nd Picturebox on the Form:
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
mooose
Jan 26th, 2000, 08:26 AM
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
mooose
Jan 26th, 2000, 08:37 AM
ooops sorry the codes working great now.. thanx a million aaron I missed out part of the code sorry.
------------------
Mooose
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.