stallion_alpa

I'm wondering is it possible to attach a simple text document (.txt) with my project so that on install it adds a README text document in the program directory in the start menu


Re: Visual Basic Express Edition READMe Inclusion?

stallion_alpa

I would also like to know how to open a .txt file that I have stored in my resources so that it opens up in notepad, with the push of a button.




Re: Visual Basic Express Edition READMe Inclusion?

Spidermans_DarkSide - VSIP

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click

'Use the default text file viewer.>>

'System.Diagnostics.Process.Start("C:\Readme.txt") 'or use>>

'Process.Start("C:\ReadMe.txt")

'Or either of the following to force Notepad to open.

'System.Diagnostics.Process.Start("Notepad.exe", "C:\ReadMe.txt") 'or use>>

'If notepad isn't the default text viewer. Force Notepad to open.

Process.Start("Notepad.exe", "C:\ReadMe.txt")

End Sub

Regards,

S_DS






Re: Visual Basic Express Edition READMe Inclusion?

stallion_alpa

I tried that but it says it the file doesn't exist. The readme file is part of my resources yet it can't seem to find it.

I'm using this code atm:
System.Diagnostics.Process.Start(My.Resources.ReadMe)

Its listed under resources, so why cant it find it




Re: Visual Basic Express Edition READMe Inclusion?

Tall Dude

Public Class Form1

Private Sub Button1_Click(ByVal sender As System.Object, _

ByVal e As System.EventArgs) Handles Button1.Click

' Because we do not spicify a drive or pathway to

' write to, or to launch the process from, they both

' use the current drive and pathway of the executing program

System.IO.File.WriteAllText("readme.txt", My.Resources.readme)

Process.Start("readme.txt")

End Sub

End Class






Re: Visual Basic Express Edition READMe Inclusion?

Spidermans_DarkSide - VSIP

Hi,

You would have to put in the full path to your filename and finish it with dot txt as above, alternatively see the reply by the Tall Dude below.

Regards,

S_DS