CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Feb 2010
    Posts
    21

    Cool resize and save picture

    hey, i have used the following code to browse & upload a picture durin runtime

    Private Sub cmdBrowse_Click()

    Me.CommonDialog1.InitDir = "D:"

    Me.CommonDialog1.Filter = "Graphic Files (*.bmp;*.gif;*.jpg)| *.bmp;*.jpg"

    Me.CommonDialog1.ShowOpen

    If Me.CommonDialog1.FileName <> "" Then Me.Image1.Picture = LoadPicture _
    (Me.CommonDialog1.FileName)

    End Sub

    do you have any sample code i can use to save the picture (image1) into an access database called "tblHrData" field name "Picture".
    I would appreciate sample code to resize the picture to fit into the image box.thanks in advance

    Regards

  2. #2
    Join Date
    Jan 2006
    Location
    Fox Lake, IL
    Posts
    15,007

    Re: resize and save picture

    Try .AutoResize=True
    David

    CodeGuru Article: Bound Controls are Evil-VB6
    2013 Samples: MS CODE Samples

    CodeGuru Reviewer
    2006 Dell CSP
    2006, 2007 & 2008 MVP Visual Basic
    If your question has been answered satisfactorily, and it has been helpful, then, please, Rate this Post!

  3. #3
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured