vb.net - Save file path on show dialog -


i want save path on text box after directory 1: whenever try close application , open again path not there.i want show every time open application.

enter image description here

private sub btnrootbrowse1_click(sender system.object, e system.eventargs) handles btnbrowse1.click         rootfolderbrowserdialog.showdialog()         txtpath1.text = rootfolderbrowserdialog.selectedpath     end sub 

you need save data (in case txtpath1.text) hard-drive (file or database) , reload in next execution.

can easy when use application-setting:

  1. in solution explorer, double-click "my project"
  2. in left pane click "setting"
  3. in table, fill in fields needed, example case: name: directorylocation type: string scope: user value: empty.
  4. sample code using:

    public sub new()     initializecomponent()      'load hard-disk     txtpath1.text = my.settings.directorylocation end sub  private sub btnrootbrowse1_click(sender system.object, e system.eventargs) handles btnbrowse1.click     rootfolderbrowserdialog.showdialog()     txtpath1.text = rootfolderbrowserdialog.selectedpath      'save hard-disk     my.settings.directorylocation = txtpath1.text     my.settings.save() end sub 

Comments

Popular posts from this blog

android - Get AccessToken using signpost OAuth without opening a browser (Two legged Oauth) -

org.mockito.exceptions.misusing.InvalidUseOfMatchersException: mockito -

google shop client API returns 400 bad request error while adding an item -