Gudia catty's Profile User Rating: -----

Reputation: 0 Apprentice
Group:
New Members
Active Posts:
2 (0 per day)
Joined:
10-June 12
Profile Views:
559
Last Active:
User is offline Jun 11 2012 12:22 AM
Currently:
Offline

Previous Fields

Country:
IN
OS Preference:
Windows
Favorite Browser:
Chrome
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0

Latest Visitors

Icon   Gudia catty Knowledge is Power

Posts I've Made

  1. In Topic: how to save images in a particular folder in vb.net

    Posted 10 Jun 2012

    View PostnK0de, on 10 June 2012 - 04:11 AM, said:

    where's the code you tried and what exactly is the error you're getting?


    Im going to type the code so text formatting will b different..


    Dim strBasepath as string
    Dim strFilename as string
    
    Private sub Picturebox1_click(byval sender as system.object, ByVal e as system.Eventargs) handles Picturebox1.click
     Openfiledialog1.Filter="only images|*.jpg|text files|*.txt"
     OpenFileDialog1.title="Select a file"
     dim s as string =Application.executablePath & "\images\"
     openfileDialog1.InitialDirectory = s
     OpenfileDialog1.showdialog()
    End Sub
    
    // coading for openfiledialog tool on its fileok event
    
    if openfiledialog1.checkfileexists=true then
     picturebox1.imagelocation = openfiledialog1.filename.tostring
     picturebox1.sizemode=pictureboxsizemode.stretchimage
    else
     msgbox("Please Select a Image")
    end if
    end sub
    
    
    // now on a buttons click i want that the picture that is in picture box should be stored in a folder named images for that i have done this coding
    
    button1_click's coading
    
    strFilename = openfiledialog1.filename.tostring
    strBasepath = application.startuppath & "\images"
    if directory.exists(strBasepath) =false then
    call directory.createdirectory(strBasepath)
    end if
    
    call picture.image.save(strBasepath & "\" & strFilename, System.Drawing.Imaging.Imageformat.jpeg))
    

My Information

Member Title:
New D.I.C Head
Age:
24 years old
Birthday:
January 8, 1990
Gender:
Interests:
web development nd designing
software development
Programming Languages:
PHP + mysql
vb.net
c++

Contact Information

E-mail:
Click here to e-mail me

Friends

Comments

Gudia catty has no profile comments yet. Why not say hello?