1 2 3 4 5 6 7 8 9 10 11 12 13 | Dim a As PaintEventArgs Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ' Create image. Dim newImage As Image = Image.FromFile("C:\Documents and Settings\Administrator\Bureaublad\ijswinkel logo.bmp") ' Create Point for upper-left corner of image. Dim ulCorner As New Point(0, 0) ' Draw image to screen. a.Graphics.DrawImage(newImage, ulCorner) [*] End Sub End Class |
1 2 | g.DrawImage(img,destrect,75,40,10,10,GraphicsUnit.Pixel) |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | Dim DrawBitmap As Bitmap DrawBitmap = New Bitmap(PictureBox1.Width, PictureBox1.Height) Dim g As Graphics g = Graphics.FromImage(DrawBitmap) Dim newImage As Image = Image.FromFile("C:Documents and SettingsAdministratorBureaubladijswinkel logo.bmp") Dim ulCorner As New Point(0, 0) Dim destrect As New Rectangle(100, 100, 10, 10) g.DrawImage(newImage, destrect, 75, 40, 10, 10, GraphicsUnit.Pixel) PictureBox1.Image = DrawBitmap End Sub |
|
Forum Opties | |
---|---|
Forumhop: | |
Hop naar: |