|
-
May 9th, 2013, 01:38 AM
#1
Thread Starter
New Member
Need help
Hey guys I've just begun coding in visual basic 2008 at my school and I would like to know how would i got about implementing a logon and adding photos into a combobox as I am making a shop program for an assessment.
If you guys could give me any advice that would be great too thanks.
-
May 9th, 2013, 02:20 AM
#2
Re: Need help
For future reference, please provide meaningful titles for your threads. The title is supposed to allow us to see which threads are relevant. A title like "Need help" means nothing because everyone who posts needs help, so titles like that mean that we have to waste our time opening every single thread to find the relevant ones. To make providing meaningful titles possible, please keep each thread to a single topic and each topic to a single thread. You've asked two basically unrelated questions in one thread so it's hard to provide a succinct title. If the thread only relates to one topic then it's easy to provide a title that summarises that topic.
With regards to implementing login functionality, follow the CodeBank link in my signature and check out my WinForms Login thread.
With regards to the photos in the ComboBox, do you actually want to display the photos inside the control or make a selection and display the corresponding image elsewhere? The latter is relatively simple while the former is not possible without drawing the items in the ComboBox yourself, which is basically too complicated for a schol student who has just started programming.
-
May 9th, 2013, 03:16 AM
#3
Thread Starter
New Member
Re: Need help
 Originally Posted by jmcilhinney
For future reference, please provide meaningful titles for your threads. The title is supposed to allow us to see which threads are relevant. A title like "Need help" means nothing because everyone who posts needs help, so titles like that mean that we have to waste our time opening every single thread to find the relevant ones. To make providing meaningful titles possible, please keep each thread to a single topic and each topic to a single thread. You've asked two basically unrelated questions in one thread so it's hard to provide a succinct title. If the thread only relates to one topic then it's easy to provide a title that summarises that topic.
With regards to implementing login functionality, follow the CodeBank link in my signature and check out my WinForms Login thread.
With regards to the photos in the ComboBox, do you actually want to display the photos inside the control or make a selection and display the corresponding image elsewhere? The latter is relatively simple while the former is not possible without drawing the items in the ComboBox yourself, which is basically too complicated for a schol student who has just started programming.
Sorry about that ok well i want it display the image inside the combobox
-
May 9th, 2013, 05:39 AM
#4
Re: Need help
In that case, you need to set the DrawMode of the ComboBox to one of the OwnerDraw values and draw the items yourself. I'm quite sure that you will be able to find examples online and that DrawMode property and/or the DrawItem event are where you should start.
-
May 9th, 2013, 10:26 AM
#5
Re: Need help
You might also want to play around with the ListView, which is better designed for using pictures as items, but doesn't have the drop-down functionality inherently. If you are willing to settle for scrolling, then the ListView will handle the images directly (though the ListView is such a strangely versatile control that it has a bewildering assortment of settings...the key one for you is Mode = Details, or something close to that). To cause that to act as a dropdown would be a bit odd, but I would suggest that it be a ListView showing images with a button to the right of it showing a down arrow. When you click the down arrow you would expand the size of the Listview from 1 item in height to N items in height (based on the amount of room you have). You'd also have to get the scrolling right so that when it expanded to N items, the item that was being displayed at 1 item height because the top item, or the selected item, or whatever else looks best. It would be a bit weird.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|