|
-
Jul 12th, 2007, 01:38 AM
#1
Thread Starter
New Member
[2005] Project i have
I am a newb in Visual Basic, but i am trying to learn all i can because it is pretty fun to me . Thanks for your time and here are my questions.
Project: To make a program that will delete, and then create a file with text in it (But not with the .txt file name). This is to be able to change the hosts file with the click of a button.
Things i would like to implement/know:
I would like to know how to do many complicated things, please try to explain them to me as well as possible .
#1. I would like to know how to make a TextBox assigned to a variable (Such as make the text input as a variable that can be placed into a text file).
#2. Make it save the variables and presets after they make them. (Such as them typing in the text they want in the file and then clicking "save as preset 1" and it saving it as button1)
#3. Delete a file in a directory, and then create a file in the directory with a text that is a variable previously defined by user).
I know i am explaining this wierd, if you have any questions please ask them.
-
Jul 12th, 2007, 02:16 AM
#2
Re: [2005] Project i have
Hi.
You can assign the textbox text to a string (somestring = textbox1.text)
There is a class called savefiledialog that will help you save
You can manipulate text with StreamWriter
to delete-save a file you can use my.Computer.FileSystem
-
Jul 12th, 2007, 02:22 AM
#3
Thread Starter
New Member
Re: [2005] Project i have
Thank you man. I will try them out .
-
Jul 12th, 2007, 09:16 AM
#4
Re: [2005] Project i have
-
Jul 12th, 2007, 11:56 PM
#5
Thread Starter
New Member
Re: [2005] Project i have
Thanks for the good luck but i am so confused, but i will learn as time goes by .
-
Jul 13th, 2007, 08:09 AM
#6
Re: [2005] Project i have
You will! Take it one step at a time. Study a lot. And ask questions here when you have them.
If you feel that your question has been answered, you can mark this thread as "Resolved" with the thread tools in the upper right hand corner to let everybody know.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|