Results 1 to 14 of 14

Thread: Need help in vb

  1. #1

    Thread Starter
    Hyperactive Member csKanna's Avatar
    Join Date
    Dec 2005
    Location
    Tech-Tips-Now.com
    Posts
    339

    Need help in vb

    I had a test recently. in that test asked me the following question:

    You have a picture of each employee stored on a network drive in JPEG format, with the path stored in a text field in an Access Database. You want to display this picture on a form in your VB application. Which one of the following correctly displays the picture as described in the scenario above?

    Choice 1
    An image control updated through code

    Choice 2
    An image control box bound to the database table and field

    Choice 3
    A unbound OLE Object control updated through code

    Choice 4
    A user-defined hyperlink control linked to the table and field

    Choice 5
    A picture box control bound to a data control

    somebody help me on this pleae

  2. #2
    Lively Member
    Join Date
    Oct 2004
    Posts
    91

    Re: Need help in vb

    First, im surprised that with about the same amount of posts as I have, you are still getting away with posting such vague titles. Please make it more specific in the future :P

    Anyways, I believe its just an image control updated through code. I mean, sure its a complicated example, but ... its still just an image box that you are changing... flame me if I'm wrong

    EDIT: I see you also have user input... looks like it could be hte fifth choice then.

  3. #3
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Need help in vb

    Quote Originally Posted by Josh 4444 S
    First, im surprised that with about the same amount of posts as I have, you are still getting away with posting such vague titles. Please make it more specific in the future :P
    I couldn't agree more!


    Right then, on to answering the question..

    Is the picture in the database? If it is, then you could use a bound control (I would personally use code, but based on the question, it seems you aren't at this level yet). If it isn't in the database, the control cant be bound.

    Will a hyperlink show the picture on your form?

    Once you have answered my two questions, you are down to two possible answers, one of which you should be able to eliminate quite easily.

  4. #4

    Thread Starter
    Hyperactive Member csKanna's Avatar
    Join Date
    Dec 2005
    Location
    Tech-Tips-Now.com
    Posts
    339

    Re: Need help in vb

    Hi si_the_geek,

    I do not have answers to your questions, since this is the question in my exam. I do not know the answers. So, i thought i should ask some experts like you.

    If anybody know the answer, please help me to learn.

  5. #5
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Need help in vb

    The answer to my first question is in your original post.

    The answer to my second question needs an understanding of what a Hyperlink is.


    Tell us which options you can eliminate, and why - if necessary, we can explain where you have gone wrong.

  6. #6

    Thread Starter
    Hyperactive Member csKanna's Avatar
    Join Date
    Dec 2005
    Location
    Tech-Tips-Now.com
    Posts
    339

    Re: Need help in vb

    As per the quest.the pic is saved on a network drive and not in a database. Only the path is stored there. In such a case there will be no help of a bound control. Hence I eliminate choice 1 of your ans.

    Now the probability lies in next one . I think hyperlink will show the picture.

    Although,I do not have any idea about Hyperlink.

    If I am correct so far than I think we can move further.

    Thanks

  7. #7
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Need help in vb

    You are right about the location of the picture - which eliminates 2 of the choices.


    Time for a quick hint on the other part...

    This is a hyperlink: search.

    This is a picture:


    Now which choices remain?

  8. #8

    Thread Starter
    Hyperactive Member csKanna's Avatar
    Join Date
    Dec 2005
    Location
    Tech-Tips-Now.com
    Posts
    339

    Re: Need help in vb

    Its the second choice. Am I correct?

  9. #9
    VB Addict Pradeep1210's Avatar
    Join Date
    Apr 2004
    Location
    Inside the CPU...
    Posts
    6,614

    Re: Need help in vb

    No, it's the First one!
    Pradeep, Microsoft MVP (Visual Basic)
    Please appreciate posts that have helped you by clicking icon on the left of the post.
    "A problem well stated is a problem half solved." — Charles F. Kettering

    Read articles on My Blog101 LINQ SamplesJSON ValidatorXML Schema Validator"How Do I" videos on MSDNVB.NET and C# ComparisonGood Coding PracticesVBForums Reputation SaverString EnumSuper Simple Tetris Game


    (2010-2013)
    NB: I do not answer coding questions via PM. If you want my help, then make a post and PM me it's link. If I can help, trust me I will...

  10. #10
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Need help in vb

    Quote Originally Posted by csKanna
    Its the second choice. Am I correct?
    If you mean the second option from post #7, then you are correct.

    If you mean from the original choices (which is what I was refering to) then read your own posts again - you have already said it cant be that one.

  11. #11

    Thread Starter
    Hyperactive Member csKanna's Avatar
    Join Date
    Dec 2005
    Location
    Tech-Tips-Now.com
    Posts
    339

    Re: Need help in vb

    Do not confuse me again and again. I am tired. Please tell me the correct solution to my question on post #1. thanks.

  12. #12
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Need help in vb

    I am not trying to confuse you - I have been telling you how to work out the answer, which is an essential skill.. not just for exams/tests, but also (to a much greater level) for programming, and many other careers.

    Read the first line of post #6 (yours), which eliminates a few of the choices (possible answers to the original question).

    As I showed in post #7, a hyperlink is not a picture.


    Which of the original choices now remain?

  13. #13

    Thread Starter
    Hyperactive Member csKanna's Avatar
    Join Date
    Dec 2005
    Location
    Tech-Tips-Now.com
    Posts
    339

    Re: Need help in vb

    So,

    May i conclude this topic by assuming choice 4 as the answer to my question

    Thanks.

  14. #14
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: Need help in vb

    No, as a hyperlink is not a picture.

    This (and the knowledge you have from above) should leave only two choices.. and of those two similar choices it should be fairly clear which one is more appropriate.

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