Results 1 to 6 of 6

Thread: [2005] Project i have

  1. #1

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    10

    [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.

  2. #2
    King of sapila
    Join Date
    Oct 2006
    Location
    Greece
    Posts
    6,763

    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

  3. #3

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    10

    Re: [2005] Project i have

    Thank you man. I will try them out .

  4. #4
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    Re: [2005] Project i have


  5. #5

    Thread Starter
    New Member
    Join Date
    Jul 2007
    Posts
    10

    Re: [2005] Project i have

    Thanks for the good luck but i am so confused, but i will learn as time goes by .

  6. #6
    Registered User nmadd's Avatar
    Join Date
    Jun 2007
    Location
    U.S.A.
    Posts
    1,676

    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
  •  



Click Here to Expand Forum to Full Width