Click here to Skip to main content
15,908,254 members
Home / Discussions / C#
   

C#

 
GeneralRe: Directory Crawling Class - feedback wanted. Pin
Ennis Ray Lynch, Jr.26-Nov-07 7:41
Ennis Ray Lynch, Jr.26-Nov-07 7:41 
GeneralRe: Directory Crawling Class - feedback wanted. Pin
GuyThiebaut26-Nov-07 7:50
professionalGuyThiebaut26-Nov-07 7:50 
GeneralRe: Directory Crawling Class - feedback wanted. Pin
GuyThiebaut26-Nov-07 7:57
professionalGuyThiebaut26-Nov-07 7:57 
AnswerRe: Directory Crawling Class - feedback wanted. Pin
schoetbi26-Nov-07 10:29
schoetbi26-Nov-07 10:29 
GeneralRe: Directory Crawling Class - feedback wanted. Pin
GuyThiebaut26-Nov-07 23:05
professionalGuyThiebaut26-Nov-07 23:05 
QuestionFinding an item in a listview Pin
Lucy26-Nov-07 3:15
Lucy26-Nov-07 3:15 
AnswerRe: Finding an item in a listview Pin
SABhatti26-Nov-07 4:29
SABhatti26-Nov-07 4:29 
GeneralRe: Finding an item in a listview Pin
Lucy26-Nov-07 5:29
Lucy26-Nov-07 5:29 
Hi thank you for the link. I was trying to go about this a different way but I found the answer before your reply using trial and error, Here is my form load event and the last if statement finds the item:

            RegistryKey key = Registry.LocalMachine.OpenSubKey("RegKey_test", true);<br />
            RegistryKey k = key.OpenSubKey("Classification");<br />
            if (k != null)<br />
            {<br />
                string[] names = k.GetValueNames();<br />
                <br />
                for (int i = 0; i < k.ValueCount; i++)<br />
                {<br />
                    int values = Convert.ToInt32(k.GetValue(names[i], ""));<br />
                    ListViewItem item1 = new ListViewItem();<br />
                    ListViewItem.ListViewSubItem item2 = new ListViewItem.ListViewSubItem();<br />
                    item1.Text = names[i];<br />
                    item2.Text = Convert.ToString(values);<br />
                    item1.SubItems.Add(item2);<br />
                    listView1.Items.Add(item1);<br />
                }<br />
            }<br />
<br />
            if (key.GetValue("Threshold") != null)<br />
            {<br />
                string KeyValue = Convert.ToString(key.GetValue("Threshold", ""));<br />
                ListViewItem itemFind = listView1.FindItemWithText(KeyValue, true, 0);<br />
                if (itemFind != null)<br />
                {<br />
                    itemFind.Selected = true;<br />
                    listView1.FocusedItem = itemFind;<br />
                }<br />
            }


I am not sure if this is user friendly yet as the second column of the listview may be taken out so that the values cannot be seen by the user. I would then need a new ways to find the value needed to select the appropriate item.

Lucy
QuestionDisplaying multiple images in a picture box Pin
Ofori Boadu26-Nov-07 3:12
Ofori Boadu26-Nov-07 3:12 
AnswerRe: Displaying multiple images in a picture box Pin
Colin Angus Mackay26-Nov-07 3:35
Colin Angus Mackay26-Nov-07 3:35 
AnswerRe: Displaying multiple images in a picture box Pin
Ajay.k_Singh26-Nov-07 3:45
Ajay.k_Singh26-Nov-07 3:45 
GeneralRe: Displaying multiple images in a picture box Pin
Ofori Boadu26-Nov-07 5:25
Ofori Boadu26-Nov-07 5:25 
GeneralRe: Displaying multiple images in a picture box Pin
Ofori Boadu26-Nov-07 22:04
Ofori Boadu26-Nov-07 22:04 
AnswerRe: Displaying multiple images in a picture box Pin
Luc Pattyn26-Nov-07 4:23
sitebuilderLuc Pattyn26-Nov-07 4:23 
QuestionCreating Form Pin
karlschm26-Nov-07 2:25
karlschm26-Nov-07 2:25 
AnswerRe: Creating Form Pin
Colin Angus Mackay26-Nov-07 3:33
Colin Angus Mackay26-Nov-07 3:33 
AnswerRe: Creating Form Pin
new2pgrmg26-Nov-07 17:15
new2pgrmg26-Nov-07 17:15 
GeneralRe: Creating Form Pin
karlschm27-Nov-07 2:05
karlschm27-Nov-07 2:05 
QuestionProblem displaying on gridview by searchByDate Pin
drawmylyfe26-Nov-07 2:08
drawmylyfe26-Nov-07 2:08 
QuestionScroll Bar Issue----How to find whether the scroll bar is desplaying at runtime Pin
pashitech26-Nov-07 1:59
pashitech26-Nov-07 1:59 
QuestionNot able to populate Combobox Pin
subramanyeswari26-Nov-07 1:35
subramanyeswari26-Nov-07 1:35 
AnswerRe: Not able to populate Combobox Pin
Sun Rays26-Nov-07 1:40
Sun Rays26-Nov-07 1:40 
GeneralRe: Not able to populate Combobox Pin
subramanyeswari26-Nov-07 1:52
subramanyeswari26-Nov-07 1:52 
Questionprint form controls Pin
avvaru.murali26-Nov-07 1:31
avvaru.murali26-Nov-07 1:31 
AnswerRe: print form controls Pin
Sun Rays26-Nov-07 1:37
Sun Rays26-Nov-07 1:37 

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.