Page 1 of 3 123 LastLast
Results 1 to 15 of 36
  1. #1
    samerlol's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    In somewhere
    Posts
    107
    Reputation
    14
    Thanks
    3
    My Mood
    Asleep

    Exclamation [Help]How can i generate text from .txt file in to textbox when button click

    Hello Guys.

    i want my program when some one hit generate generate text from .txt file

    Like This
    Code:
    If GhostButton1.Enabled = True Then
    addfile.test
    End If

    i know this is wrong code but i give you example !

    for example:

    i have proxy list in .txt file
    i want when button hit load 1 proxy from txt file

    how can i do this ?

    and if i have multi textbox and i want everyone from textbox generate from txt files when button clicked


    With all due respect

  2. #2
    Honesty is an expensive gift do not expect it from cheap people!
    MPGH Member
    Matroix73's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    706
    Reputation
    42
    Thanks
    5,624
    My Mood
    Confused
    Add this code to Button_Click event

    Use this method to read the contents of a text file into a string, supplying the path.

    Code:
    Dim fileReader As String
    fileReader = My.Computer.FileSystem.ReadAllText("C:\test.txt")
    or use this method to read the contents of a text file into a string, supplying the path and file encoding type.
    Code:
    Dim fileReader As String
    fileReader = My.Computer.FileSystem.ReadAllText("C:\test.txt", _
       System.Text.Encoding.UTF32)
    Hope I helped.

  3. #3
    samerlol's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    In somewhere
    Posts
    107
    Reputation
    14
    Thanks
    3
    My Mood
    Asleep
    sorry but the code you entered not working currently, i used it but no thing happened i put it on click event and
    added this code

    fileReader = My.Computer.FileSystem.ReadAllText("C:\Users\Home\ Downloads\Compressed\XXXXXXXX_4d0a104d\XXXXXXXX_6f 85472c.txt")
    but no thing happened
    please help
    Last edited by samerlol; 06-28-2013 at 09:50 PM.

  4. #4
    Honesty is an expensive gift do not expect it from cheap people!
    MPGH Member
    Matroix73's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    706
    Reputation
    42
    Thanks
    5,624
    My Mood
    Confused
    Quote Originally Posted by samerlol View Post
    sorry but the code you entered not working currently, i used it but no thing happened i put it on click event and
    added this code



    please help
    I think the code is fine... remove the space from the path
    Home\_Downloads\

  5. #5
    samerlol's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    In somewhere
    Posts
    107
    Reputation
    14
    Thanks
    3
    My Mood
    Asleep
    Quote Originally Posted by Matroix73 View Post
    Originally Posted by samerlol
    sorry but the code you entered not working currently, i used it but no thing happened i put it on click event and
    added this code



    please help
    I think the code is fine... remove the space from the path
    Home\_Downloads\
    There is no space i checked it, no space and if there is space Visual Basic Correct it Auto

  6. #6
    Honesty is an expensive gift do not expect it from cheap people!
    MPGH Member
    Matroix73's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    706
    Reputation
    42
    Thanks
    5,624
    My Mood
    Confused
    try this

    Code:
     Dim oFile as System****.File
    Dim oRead as System****.StreamReader
    oRead = oFile.OpenText(“C:\test.txt”)
    Forum auto-replacing "IO.File" with *** idk why!!
    there is "." between system and IO
    Last edited by Matroix73; 06-29-2013 at 04:11 PM.

  7. #7
    samerlol's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    In somewhere
    Posts
    107
    Reputation
    14
    Thanks
    3
    My Mood
    Asleep
    Where i add this code
    if on button !! the code not working

  8. #8
    Honesty is an expensive gift do not expect it from cheap people!
    MPGH Member
    Matroix73's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    706
    Reputation
    42
    Thanks
    5,624
    My Mood
    Confused
    well, I found the best way to do so
    here you go

    put this into a button click
    and you must have a textbox named as TextBox1
    Code:
     Dim FILE_NAME As String = "C:\Users\user\Desktop\test.txt"
            Dim objReader As New System.I--O.StreamReader(FILE_NAME)
            TextBox1.Text = objReader.ReadToEnd
    NOTE: REMOVE THE "--" BETWEEN "I" AND "O"
    this is working with me good
    Last edited by Matroix73; 06-29-2013 at 04:31 PM.

  9. #9
    Honesty is an expensive gift do not expect it from cheap people!
    MPGH Member
    Matroix73's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    706
    Reputation
    42
    Thanks
    5,624
    My Mood
    Confused
    @samerlol let me know its working or not?

  10. #10
    Nexero's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    My VB Project
    Posts
    2,530
    Reputation
    90
    Thanks
    4,801
    My Mood
    Bored
    I think that will help you :
    Code:
    ' Form Load :
    Dim text As String = MsgBox("text you want to make the form remember it.")
    Or new Sub :
    Code:
    Private Sub Text
    text
    Code:
    ' Button Click :
    Text()

  11. #11
    Honesty is an expensive gift do not expect it from cheap people!
    MPGH Member
    Matroix73's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    706
    Reputation
    42
    Thanks
    5,624
    My Mood
    Confused
    Quote Originally Posted by ^_~DeM0N~_^ View Post
    I think that will help you :
    Code:
    ' Form Load :
    Dim text As String = MsgBox("text you want to make the form remember it.")
    Or new Sub :
    Code:
    Private Sub Text
    text
    Code:
    ' Button Click :
    Text()
    Another shit, he wants to read from txt file and if he wanted you you wrote
    its simply

    on button click
    Code:
    Textbox1.Text = "anything goes here"
    fail

  12. #12
    Nexero's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    My VB Project
    Posts
    2,530
    Reputation
    90
    Thanks
    4,801
    My Mood
    Bored
    Quote Originally Posted by Matroix73 View Post
    Another shit, he wants to read from txt file and if he wanted you you wrote
    its simply

    on button click
    Code:
    Textbox1.Text = "anything goes here"
    fail
    If he will use your he must first Dim the text for make the Form remember It Like :
    Code:
    ' If he will make the Dim name : text
    'First he must make the Dim like this :
    Dim text As String = "the text"
    TextBox1.text = text

  13. #13
    Honesty is an expensive gift do not expect it from cheap people!
    MPGH Member
    Matroix73's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    706
    Reputation
    42
    Thanks
    5,624
    My Mood
    Confused
    Quote Originally Posted by ^_~DeM0N~_^ View Post

    If he will use your he must first Dim the text for make the Form remember It Like :
    Code:
    ' If he will make the Dim name : text
    'First he must make the Dim like this :
    Dim text As String = "the text"
    TextBox1.text = text
    You don't know anyshit, learn some VB basics and then come debate
    and test my code first

  14. #14
    Nexero's Avatar
    Join Date
    May 2013
    Gender
    male
    Location
    My VB Project
    Posts
    2,530
    Reputation
    90
    Thanks
    4,801
    My Mood
    Bored
    Quote Originally Posted by Matroix73 View Post
    You don't know anyshit, learn some VB basics and then come debate
    and test my code first
    I will test this shit you just posted ?
    Just write textbox1.text = "shit" ?

  15. #15
    Honesty is an expensive gift do not expect it from cheap people!
    MPGH Member
    Matroix73's Avatar
    Join Date
    Jan 2013
    Gender
    male
    Posts
    706
    Reputation
    42
    Thanks
    5,624
    My Mood
    Confused
    Quote Originally Posted by ^_~DeM0N~_^ View Post

    I will test this shit you just posted ?
    Just write textbox1.text = "shit" ?
    please please stop!!! don't post something that you don't know anyshit about it.

Page 1 of 3 123 LastLast

Similar Threads

  1. [Help Request] Need help! How can I cheat in Thailand server?
    By Tmnttsy in forum Alliance of Valiant Arms (AVA) Help
    Replies: 0
    Last Post: 06-26-2013, 05:11 AM
  2. [Help Request] How can i write text in the menu settings if i press escape?
    By JStyler in forum Call of Duty Modern Warfare 2 GSC Modding Help/Discussion
    Replies: 0
    Last Post: 05-09-2013, 04:43 AM
  3. Replies: 1
    Last Post: 05-05-2012, 08:56 AM
  4. [Help]How to draw text from a file?
    By seeplusplus in forum Combat Arms Coding Help & Discussion
    Replies: 29
    Last Post: 10-05-2010, 04:47 PM
  5. [HELP] how can i....
    By Evangelyon in forum WarRock - International Hacks
    Replies: 0
    Last Post: 04-29-2007, 04:43 PM