Results 1 to 18 of 18

Thread: guys, help me with this///

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Posts
    209

    guys, help me with this///

    i made my project here so called "student profile". it runs properly and OK!
    but i have a problem. i want to change picture everytime i change name...
    can somebody share their code?
    thanks in advance!

    see SS!
    Attached Images Attached Images  

  2. #2
    Hyperactive Member Arachnid13's Avatar
    Join Date
    Jan 2003
    Location
    England
    Posts
    327

    Re: guys, help me with this///

    How do you have the pictures stored? In a database? as files saved with a student id?
    Last edited by Arachnid13; Aug 21st, 2008 at 08:30 AM.
    Do you wake up in the morning feeling sleepy and grumpy? Then you must be Snow White

  3. #3
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: guys, help me with this///

    Try to give some more details like where you stored, when you want to change, etc.
    If you are using filepath that was stored in a database, then write the code for displaying the picture from database, and call that function when you press back or next button..
    Best wishes

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Posts
    209

    Re: guys, help me with this///

    yah sir, i connect it to database...
    can you help me, how to code sir?

  5. #5
    Addicted Member acidsnake's Avatar
    Join Date
    Feb 2008
    Posts
    157

    Re: guys, help me with this///

    Quote Originally Posted by jhaps007
    yah sir, i connect it to database...
    can you help me, how to code sir?
    if studno.text = 12345 then
    pic.image = path c:\image1
    end

    pre yung code para ganyan pero kailangan mo i lagay sa database yung image lagyan mo narin ng number para di mahirap tawagin yung pic

  6. #6
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: guys, help me with this///

    what do you have stored in the database? the path of file?

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: guys, help me with this///

    Quote Originally Posted by jhaps007
    yah sir, i connect it to database...
    can you help me, how to code sir?
    You say you connect to a database, but are the pictures you want to use stored in that database?

  8. #8
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: guys, help me with this///

    Code:
    Private Sub cmdBack_Click()
    Data1.Recordset.MovePrevious
    LoadingPic 'sub
    End Sub
    
    Private Sub cmdNext_Click()
    Data1.Recordset.MoveNext
    LoadingPic 'sub
    End Sub
    
    Private Sub Form_Load()
    'connecting the database
    Data1.DatabaseName = App.Path & "\database.mdb"
    Data1.RecordSource = "student"
    Data1.Refresh
    LoadingPic 'sub
    End Sub
    
    Private Sub LoadingPic()
    'sub for displaying the picture from the database
    Picture1.Picture = LoadPicture(Data1.Recordset.Fields("picture"))
    End Sub
    I hope this will help you..

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  9. #9

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Posts
    209

    Re: guys, help me with this///

    Quote Originally Posted by Hack
    You say you connect to a database, but are the pictures you want to use stored in that database?
    yes, sir...
    or do you have have any idea sir?

  10. #10
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: guys, help me with this///

    jhaps007,
    Try to give as much as details that you can...
    Then only we will be able to solve the problem...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  11. #11
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: guys, help me with this///

    In my post #8,
    I had assumed that the fullpath of the picture file is stored in the database along with other fields(eg. Surname,FirstName,Course,Age,picture)

    Then I wrote a function for displaying the picture.
    Then called that function each time, when the record is changed.

    I think, you understand my method...

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  12. #12
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: guys, help me with this///

    DTR TIME RECORDED SYSTEM??
    What's this ...???

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  13. #13

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Posts
    209

    Re: guys, help me with this///

    here sir, try to test my source for you to understand...

    download link
    http://rapidshare.com/files/13922141...entProfile.rar

  14. #14
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: guys, help me with this///

    Sorry, you are using ADO. I am not much familiar with ADO but only with DAO...
    You can use my technique(post #8) with some changes(I used DAO, so there will be some changes in ADO), in your program....

    Don't worry... there any many experts and gurus in this forum who are experts in ADO.... Just wait for what they have to say..

    One thing I want to say is...
    You can include another field in your table(database) for storing the path of the picture file....

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

  15. #15

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Posts
    209

    Re: guys, help me with this///

    Quote Originally Posted by akhileshbc
    Sorry, you are using ADO. I am not much familiar with ADO but only with DAO...
    You can use my technique(post #8) with some changes(I used DAO, so there will be some changes in ADO), in your program....

    Don't worry... there any many experts and gurus in this forum who are experts in ADO.... Just wait for what they have to say..

    One thing I want to say is...
    You can include another field in your table(database) for storing the path of the picture file....
    thanks sir for further explanations....
    guys, who can help me here!

  16. #16
    Frenzied Member
    Join Date
    Dec 2007
    Posts
    1,072

    Re: guys, help me with this///

    Use LoadPicture

  17. #17

    Thread Starter
    Addicted Member
    Join Date
    Jan 2008
    Posts
    209

    Re: guys, help me with this///

    Quote Originally Posted by Zach_VB6
    Use LoadPicture
    thanks sir but i tried a lot...
    anyway sir, try to download my attachment here for you to understand...
    hope you can help me.
    thanks in advance!

  18. #18
    Freelancer akhileshbc's Avatar
    Join Date
    Jun 2008
    Location
    Trivandrum, Kerala, India
    Posts
    7,652

    Re: guys, help me with this///

    If you have saved the pictures in the same folder with firstname as filename, then try this:
    Code:
    Picture1.Picture = LoadPicture(app.path & "\" & txtFirstName.text & ".jpg")
    Use this line of code when you navigate through recordest(I mean when you click on Back button or Next button)..

    -Good day pal
    Akhilesh

    If my post was helpful to you, then express your gratitude using Rate this Post.
    And if your problem is SOLVED, then please Mark the Thread as RESOLVED (see it in action - video)
    My system: AMD FX 6100, Gigabyte Motherboard, 8 GB Crossair Vengance, Cooler Master 450W Thunder PSU, 1.4 TB HDD, 18.5" TFT(Wide), Antec V1 Cabinet

    Social Group: VBForums - Developers from India


    Skills: PHP, MySQL, jQuery, VB.Net, Photoshop, CodeIgniter, Bootstrap,...

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