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

html - Difficulties with background-image property -

visual studio code - What does the isShellCommand property actually do and how should you use it? -

ios - Segue not passing data between ViewControllers -