|
-
Mar 13th, 2007, 10:41 AM
#1
Thread Starter
Lively Member
image scale
Code:
Private Sub Form_Load()
Me.Font.Bold = True
With Picture1
.AutoRedraw = True
.ScaleLeft = 101.46667
.ScaleWidth = 99.7 - 101.46667
.ScaleTop = 2.85667
.ScaleHeight = 4.0166694 - 2.85667
End With
End Sub
Private Sub picture1_mousemove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.Caption = X
Label2.Caption = Y
End Sub
with the code above, when i change the picture1(red color) to image 1(because i need to use image). it came out an compile error:Method or data member not found. how to solve this problem?
-
Mar 13th, 2007, 11:19 AM
#2
Lively Member
Re: image scale
Image component have not ScaleLeft, ScaleWidth , ScaleTop ,ScaleHeight properties.
-
Mar 13th, 2007, 11:37 AM
#3
Re: image scale
 Originally Posted by behzad
Image component have not ScaleLeft, ScaleWidth , ScaleTop ,ScaleHeight properties.
Indeed.
You solve the problem by going back to useing a picture control.
-
Mar 13th, 2007, 11:37 AM
#4
Thread Starter
Lively Member
Re: image scale
 Originally Posted by behzad
Image component have not ScaleLeft, ScaleWidth , ScaleTop ,ScaleHeight properties.
how to set the image scale. can somebody provide the code.thanks.
-
Mar 13th, 2007, 11:44 AM
#5
Thread Starter
Lively Member
Re: image scale
 Originally Posted by Hack
Indeed.
You solve the problem by going back to useing a picture control.
i use picture box to load different picture each time.the picture size is not same. so, when i load a picture that the size is smaller or bigger than the picture box.
the data use to represent each pixel in picture is false because the scale that i set use code in #1(above) is fixed to the picture box size, not the picture size which i loaded.
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
|