2017-11-14 9 views

답변

0
dim hp as integer = 0 
    hp += 10 
    '189 for width, 22 for height 
    Dim rect As Rectangle = New Rectangle(hp, 0, 189, 22) 
    Dim bit As Bitmap = New Bitmap(My.Resources.HPBar_Right, 189, 22) 
    Dim cropBitmap = New Bitmap(189, 22) 
    Dim g As Graphics = Graphics.FromImage(cropBitmap) 
    g.DrawImage(bit, 0, 0, rect, GraphicsUnit.Pixel) 
    hp2.Image = cropBitmap 
    hp2.Left += 10 
    hp2.Refresh()