Alright basically what I want to be able to do is control my application with a text file converted as a string or just plain from file.
Here's what I have:
What I want is to be able to is use the string to run a command in my program. I simply what to do a Me.Close() to start (thats all the file contains currently)Code:Dim MyStrCmd As String MyStrCmd = My.Computer.FileSystem.ReadAllText("C:\MyApp\Command.txt")
How am I able to simply just have my application read the string and execute it on say a the click of a button.
I need something similar to this, just something real simple if possible but I'll try anything you guys can think of.
So something likeCode:Me.BackgroundImage = System.Drawing.Image.FromFile(My.Computer.FileSystem.ReadAllText("C:\MyApp\Resource1.REZ")) 'This works!
I tried usingCode:Run Command = My.Computer.FileSystem.ReadAllText("C:\text.txt") 'What I want
as well but I don't know how to use it, the page I got this from didn't fully explain but it seemed like ti was talking about what i was looking for.Code:Dim MemStream As New IO.MemoryStream(System.Text.Encoding.ASCII.GetBytes(MyStrCmd))




Reply With Quote