Cannot find the proper way to write the code of a loop

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
Hi, my name is Benjamin, <br/>
I need help with "loop", how to properly write the code <br/>
that i can get a message box containing the items who have the first letter i asked in a textbox , and the items are in a list box. So I repeat, i have a list box, i have items in it, and i have a text box upper that i wrote a letter in,
and i want that when i click on the button under, it shows me the items in the list box that begin with the letter I entered in the text box.Thats it, Im sure somebody will help me soon, its not so hard i think...;)
What Ive tried so far is the minimun, i tried to write :
In the section of my button2_click:
dim a as integer
For a = 97 to 122
if Listbox1.items.indexOf(0) = Textbox1.text then
messagebox.show( Listbox.items.contains(textbox1.text))
-----?????-----
Then yeah thats it , i dont remember now...
----------------
My Computers hardware..:



<table border="0" width="100%
<tbody>
<tr>
<td width="48%" align="center" bgcolor="#efefef <span style="font-size:x-small Operating System </td>
<td width="4% </td>
<td width="48%" align="center" bgcolor="#efefef <span style="font-size:x-small System Model </td>
</tr>
<tr>
<td width="48%" align="left" valign="top <span style="font-size:x-small Windows 7 Professional (x64) (build 7600)<br/>
Install Language: English (United States)<br/>
System Locale: English (United States)</td>
<td width="4% </td>
<td width="48%" align="left" valign="top <span style="font-size:x-small Dell Inc. Inspiron 1525<span> <br/>
<br/>
Enclosure Type: Portable</td>
</tr>
<tr>
<td width="48%" align="center" bgcolor="#efefef <span style="font-size:x-small Processor<span> <sup>a</sup> </td>
<td width="4% </td>
<td width="48%" align="center" bgcolor="#efefef <span style="font-size:x-small Main Circuit Board<span> <sup>b</sup> </td>
</tr>
<tr>
<td width="48%" align="left" valign="top <span style="font-size:x-small 2.40 gigahertz Intel Core2 Duo<br/>
64 kilobyte primary memory cache<br/>
3072 kilobyte secondary memory cache<br/>
64-bit ready<br/>
Multi-core (2 total)<br/>
Not hyper-threaded</td>
<td width="4% </td>
<td width="48%" align="left" valign="top <span style="font-size:x-small Board: Dell Inc. 0U990C<span> <br/>
</td>
</tr>
<tr>
<td width="48%" align="center" bgcolor="#efefef <span style="font-size:x-small Drives </td>
<td width="4% </td>
<td width="48%" align="center" bgcolor="#efefef <span style="font-size:x-small Memory Modules<span> <sup>c,d</sup> </td>
</tr>
<tr>
<td rowspan="5" width="48%" align="left" valign="top <span style="font-size:x-small 146.83 Gigabytes Usable Hard Drive Capacity<br/>
121.66 Gigabytes Hard Drive Free Space<br/>
<br/>
TSSTcorp DVD+-RW TS-L632H ATA Device [Optical drive]<br/>
<br/>
ST9160823ASG [Hard drive] (160.04 GB) -- drive 0, s/n 5NK18Q9G, rev 3.ADE,<span> http://www.belarc.com/smart.html SMART <span> Status: Healthy</td>
<td width="4% </td>
<td width="48%" align="left" valign="top <span style="font-size:x-small 4088 Megabytes Usable Installed Memory<br/>
<br/>
Slot DIMM_A has 2048 MB <br/>
Slot DIMM_B has 2048 MB</td>
</tr>
<tr>
<td width="4% </td>
</tr>
</tbody>
</table>

View the full article
 
Back
Top