combobox rightclick file deletion (vb.net) -


im trying delete item combobox ussing rightclick event can seam code it

what have following:

        private sub combobox1_rightclick(byval sender system.object, byval e system.eventargs) handles combobox1.rightclick dim deleteitem string= combobox1.text         system.io.file.delete( "c:\" & deleteitem & ".txt" ) msgbox("file deleted")     end sub 

if trying delete file name, try this:

   private sub combobox1_mousedown(sender object, e mouseeventargs) handles combobox1.mousedown        if e.button = mousebuttons.right             dim deleteitem string= combobox1.text             kill("c:\" & deleteitem & ".txt")             msgbox("file deleted")         end if     end sub 

Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -