|
-
Aug 15th, 2000, 12:34 PM
#1
Thread Starter
Lively Member
Hey fellers,
how can I find the height and width of a bitmap before I display it in a picture box?
Cheers!
-
Aug 15th, 2000, 12:54 PM
#2
_______
<?>
[code}
'add a second picture box invisible
Private Sub Command1_Click()
Set Picture1 = LoadPicture("C:\images\dirtbagdog.jpg")
MsgBox Picture1.Picture.Width & " " _
& Picture1.Picture.Height
Set Picture1 = LoadPicture()
End Sub
[/code]
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 15th, 2000, 01:08 PM
#3
Lively Member
Or without the invisible picturebox
Code:
Dim pic As IPictureDisp
Set pic = LoadPicture("SomePicture.bmp")
MsgBox pic.Height & " " _
& pic.Width
Picture1.Picture = pic
-
Aug 15th, 2000, 01:38 PM
#4
_______
<?>
'that will work
'I would add this to get rid of unneeded baggage
'ie memory
'unload the picture and dump the object
Set pic = LoadPicture()
Set IPictureDisp = Nothing
"A myth is not the succession of individual images,
but an integerated meaningful entity,
reflecting a distinct aspect of the real world."
___ Adolf Jensen
-
Aug 15th, 2000, 02:09 PM
#5
Thread Starter
Lively Member
Cheers
cheers guys. I'd tried that before - I've tried about everything, but I omitted the "Set" in "Set pic= etc.", and it wouldn't work. I don't doubt it'll work now - thanx again...
-
Aug 15th, 2000, 02:24 PM
#6
Fanatic Member
Read the file header. You can get information about the header on www.wotsit.org
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|