Jump to content
Xtreme .Net Talk

Recommended Posts

Posted (edited)

Im trying to open a text document on a button click for a test.

However, the debugger says it cannot find the file.

Can anyone see any obvious errors in the code?

The files does exist on my c: drive!

 

Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click

       Shell("c:\obdcconf.txt")
   End Sub

Edited by divil
  • *Experts*
Posted

You should use this to start processes and programs, dont use Shell:

System.Diagnostics.Process.Start()

 

Btw. Its [ vb ] and [ /vb ] to make it appear as vb code :) , without spaces.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...