Saving pictures

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • dr3amxstar
    New Member
    • May 2007
    • 55

    Saving pictures

    Hi im using VB 2005. I did some drawing on a bmp and assign it to a picturebox whereby after i save the picturebox. However the save picture is very small whereas the picture i see on the form is quite big. Why is this so?

    Code:
     'Make the PictureBox control large enough to fit all your drawings.       
            Me.PictureBox1.Size = New Size(5000, 5000)
            'Make a bitmap object with the size of the PictureBox control.       
            Dim bm As New Bitmap(Me.PictureBox1.Size.Width, Me.PictureBox1.Size.Height)
            'Create graphics form the bitmap object        
            Dim g As Graphics = Graphics.FromImage(bm)
            'Draw whatever you want in bitmap
     Me.PictureBox1.Image = bm
            'PictureBox1.Image.Save("G:\Sequence1.bmp")
Working...