Shell() in VB .Net?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Now I am using the Shell command in the following way,
Shell("Notepad C:\Test.txt", AppWinStyle.NormalFocus)

If I save the content of Test.txt as binary data into my database and read
it back from the database. Is that possible to use the Shell command to
launch Notepad (or other programs like Explorer) with binary stream?

Thanks.
 
John said:
If I save the content of Test.txt as binary data into my database and read
it back from the database. Is that possible to use the Shell command to
launch Notepad (or other programs like Explorer) with binary stream?

That's not possible, except you provide your own text editing form in your
application. What you can do is extracting the binary data to a file, start
notepad, wait until it exits and read back the file's content. The listing
below will give you an idea of the necessary steps:

\\\
Imports System.Diagnostics
..
..
..
WriteDataToFile(...)
Dim p As Process = Process.Start(FileName)
p.WaitForExit()
p.Dispose()
ReadDataFromFile(...)
///
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top