Click here to Skip to main content
15,899,475 members
Home / Discussions / C#
   

C#

 
Questionhow to save a recorded macro? Pin
mschotamaster18-Dec-11 3:36
mschotamaster18-Dec-11 3:36 
AnswerRe: how to save a recorded macro? Pin
OriginalGriff18-Dec-11 3:43
mveOriginalGriff18-Dec-11 3:43 
AnswerRe: how to save a recorded macro? Pin
Eddy Vluggen18-Dec-11 3:45
professionalEddy Vluggen18-Dec-11 3:45 
Questionhow to save a recorded macro? Pin
mschotamaster18-Dec-11 3:34
mschotamaster18-Dec-11 3:34 
AnswerRe: how to save a recorded macro? Pin
OriginalGriff18-Dec-11 3:42
mveOriginalGriff18-Dec-11 3:42 
AnswerRe: how to save a recorded macro? Pin
Rajesh Anuhya18-Dec-11 21:36
professionalRajesh Anuhya18-Dec-11 21:36 
Questionhow to compare the textbox data with listbox items ? Pin
zahra199118-Dec-11 2:27
zahra199118-Dec-11 2:27 
AnswerRe: how to compare the textbox data with listbox items ? Pin
DaveyM6918-Dec-11 2:43
professionalDaveyM6918-Dec-11 2:43 
A ListBox contains a collection of objects available under the Items property which can be enumerated with foreach. The only problem is that they are objects, and what is dispayed textually comes from each object's ToString method.

If you have put plain strings in the list then you can do a foreach like:
C#
foreach(object item in listBox.Items)
    if((string) item == textbox.Text)
        // do your thing

If they are other objects then you will need to cast to that type and check the resulting instance for the string in whatever way is correct for you (a property, ToString() etc).
Dave

Binging is like googling, it just feels dirtier.
Please take your VB.NET out of our nice case sensitive forum.
Astonish us. Be exceptional. (Pete O'Hanlon)

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)



AnswerRe: how to compare the textbox data with listbox items ? Pin
#realJSOP18-Dec-11 2:45
professional#realJSOP18-Dec-11 2:45 
AnswerRe: how to compare the textbox data with listbox items ? Pin
OriginalGriff18-Dec-11 3:44
mveOriginalGriff18-Dec-11 3:44 
QuestionHow i can set icon for new file extenstion ? Pin
Honeyboy_2018-Dec-11 1:22
Honeyboy_2018-Dec-11 1:22 
AnswerRe: How i can set icon for new file extenstion ? Pin
Eddy Vluggen18-Dec-11 1:38
professionalEddy Vluggen18-Dec-11 1:38 
GeneralRe: How i can set icon for new file extenstion ? Pin
Honeyboy_2018-Dec-11 1:42
Honeyboy_2018-Dec-11 1:42 
GeneralRe: How i can set icon for new file extenstion ? Pin
Eddy Vluggen18-Dec-11 1:47
professionalEddy Vluggen18-Dec-11 1:47 
AnswerRe: How i can set icon for new file extenstion ? Pin
Sivaraman Dhamodharan20-Dec-11 22:58
Sivaraman Dhamodharan20-Dec-11 22:58 
Questionwhen i press '#' on text box i need to see '.' - how to do it ? Pin
goldsoft18-Dec-11 0:45
goldsoft18-Dec-11 0:45 
AnswerRe: when i press '#' on text box i need to see '.' - how to do it ? Pin
#realJSOP18-Dec-11 2:49
professional#realJSOP18-Dec-11 2:49 
GeneralRe: when i press '#' on text box i need to see '.' - how to do it ? Pin
SledgeHammer0120-Dec-11 6:27
SledgeHammer0120-Dec-11 6:27 
AnswerRe: when i press '#' on text box i need to see '.' - how to do it ? Pin
hirendra_sisodiya19-Dec-11 2:04
hirendra_sisodiya19-Dec-11 2:04 
GeneralRe: when i press '#' on text box i need to see '.' - how to do it ? Pin
SledgeHammer0120-Dec-11 6:21
SledgeHammer0120-Dec-11 6:21 
GeneralRe: when i press '#' on text box i need to see '.' - how to do it ? Pin
Pete O'Hanlon20-Dec-11 6:53
mvePete O'Hanlon20-Dec-11 6:53 
AnswerRe: when i press '#' on text box i need to see '.' - how to do it ? Pin
XsyNvs20-Dec-11 18:36
XsyNvs20-Dec-11 18:36 
GeneralHello Old Pros and Beginners… Pin
N8tiv17-Dec-11 21:32
N8tiv17-Dec-11 21:32 
GeneralRe: Hello Old Pros and Beginners… Pin
Richard MacCutchan17-Dec-11 21:39
mveRichard MacCutchan17-Dec-11 21:39 
GeneralRe: Hello Old Pros and Beginners… Pin
N8tiv17-Dec-11 22:05
N8tiv17-Dec-11 22:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.