![]() ![]() Now double click the ‘Delete command button’ and add this line of code:lstcountries.removeitem lstcountries.listindex (This will delete a selected item from the list)7. Now double click the ‘Add command Button’ and add the following code:lstcountries.additem txtcountry.text (this will send the input text into the list box from the textbox)tfocus (This code will set the focus over textbox right after the entry of a country)txtcountry = “” (this will clear the textbox right after the the entry for a new entry)6. Now insert 3 command buttons (Add button, Delete button & Clear button), 1 listbox, and a textbox on to the form as shown below:4.Ĭhange the properties of the following objects:TextboxCaption = emptyName = txtcountrylistBoxName = lstcountriescommand1 (Add button)cmdaddcommand2 (Delete button)cmddeletecommand3 (Clear button)cmdclear5. Open Visual Basic 6.0 from the start menu2.
0 Comments
Leave a Reply. |