728x90
    Dim p1 As StdPicture
    Dim oldwide As Long, oldhigh As Long
    Dim newwide As Long, newhigh As Long
    Me.ScaleMode = vbPixels
    
   Picture1.BorderStyle = vbBSNone
    Picture1.ScaleMode = vbPixels
    Picture1.AutoRedraw = True
   
   ' load a jpeg
    Set p1 = LoadPicture(App.Path & "\test.jpg")
   
   ' get the width and height of the jpeg in pixels
    oldwide = Me.ScaleX(p1.Width, vbHimetric, vbPixels)
    oldhigh = Me.ScaleY(p1.Height, vbHimetric, vbPixels)
       
   ' make picture box width and height one tenth original
    newwide = oldwide / 10: newhigh = oldhigh / 10
    Picture1.Move 0, 0, newwide, newhigh
   
   ' paint the jpeg into it at the new reduced size
    Picture1.PaintPicture p1, 0, 0, newwide, newhigh
    Picture1.Picture = Picture1.Image
    SavePicture Picture1.Picture, App.Path & "\testpicsmall.bmp"
  • 네이버 블러그 공유하기
  • 네이버 밴드에 공유하기
  • 페이스북 공유하기
  • 카카오스토리 공유하기