vb.net - OpenFileDialog set complete path -


        dim streamf system.io.stream         dim stringf string         stringf = openfiledialog1.filename.tostring()         streamf = openfiledialog1.openfile() 

i have file screenshot.png attached on application installation path means if user run .exe file desktop store screenshot.png on desktop , on.

now need full path screenshot.png file sent in fax

    dim srcbt byte()     dim encodedbase64 string     dim filereader new io.filestream(stringf, io.filemode.open)      redim srcbt(filereader.length)     filereader.read(srcbt, 0, filereader.length)     filereader.close()      encodedbase64 = system.convert.tobase64string(srcbt) 

so problem part how can put location of file stringf ? because example have force user locate file using openfiledialog , have predefined file

this should convert (relative) path absolut path:

dim stringf_info new system.io.fileinfo(stringf) stringf = stringf_info.fullname 

Comments

Popular posts from this blog

php - Invalid Cofiguration - yii\base\InvalidConfigException - Yii2 -

How to show in django cms breadcrumbs full path? -

ruby on rails - npm error: tunneling socket could not be established, cause=connect ETIMEDOUT -