Dim p As WinForm.Painter = e.Form.Controls("Painter1") Dim g As Graphics = p.Graphics Dim img = getImage("d:\test.jpg") Dim bmp As bitmap If img.width > p.width OrElse img.height > p.height Then bmp = new bitmap(img, p.Width, p.height) End If g.drawimage(bmp,0,0) p.Repaint()