how to set current image location in vb.net -


how set current image location in vb.net if use drag , drop even. seems imagelocation doesn't work because tried outputting image location using messagebox. didn't show anything. how image location of file have drop picturebox transfer on directory?

private sub pb_dragdrop(byval sender object, byval e system.windows.forms.drageventargs) handles pb.dragdrop             dim filetomove string             dim movelocation string             try                 pb.image = image.fromfile(ctype(e.data.getdata(dataformats.filedrop), array).getvalue(0).tostring)                    filetomove = pb.imagelocation                   movelocation = "c:\pics\" + textbox1.text + ".jpg" '"                  if system.io.file.exists(filetomove) = true                     system.io.file.move(filetomove, movelocation)                  end if             catch ex exception                 messagebox.show("error doing drag/drop")             end try         end sub 

why don't save e.data.getdata(dataformats.filedrop), array).getvalue(0).tostring variable? file path looking for. not sure why imagelocation property not work here.


Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -