Results 1 to 5 of 5

Thread: image scale

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2006
    Posts
    120

    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?

  2. #2
    Lively Member
    Join Date
    Sep 2002
    Posts
    76

    Re: image scale

    Image component have not ScaleLeft, ScaleWidth , ScaleTop ,ScaleHeight properties.

  3. #3
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: image scale

    Quote 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.

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 2006
    Posts
    120

    Re: image scale

    Quote 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.

  5. #5

    Thread Starter
    Lively Member
    Join Date
    May 2006
    Posts
    120

    Re: image scale

    Quote 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
  •  



Click Here to Expand Forum to Full Width