Page 2 of 3 FirstFirst 123 LastLast
Results 16 to 30 of 36
  1. #16
    wut12345's Avatar
    Join Date
    Oct 2012
    Gender
    male
    Posts
    294
    Reputation
    16
    Thanks
    1,453
    Quote Originally Posted by ^_~DeM0N~_^ View Post

    I will test this shit you just posted ?
    Just write textbox1.text = "shit" ?
    Chill out bra

  2. The Following User Says Thank You to wut12345 For This Useful Post:

    Matroix73 (06-30-2013)

  3. #17
    Aly El-Haddad's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Egypt
    Posts
    67
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by Matroix73 View Post
    please please stop!!! don't post something that you don't know anyshit about it.
    Don't worry about these guys
    Keep on

  4. #18
    samerlol's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    In somewhere
    Posts
    107
    Reputation
    14
    Thanks
    3
    My Mood
    Asleep
    Hello Guys..

    Sorry i was busy, about the codes above

    Code:
    Textbox1.Text = "anything goes here"
    This take a long time to make my program
    because i have 5 files and every file size between 7-11 MB
    and if i want to do this i did it but it's fail.


    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()
    and this is take long a time.



    Dim FILE_NAME As String = "C:\Users\Home\Downloads\Compressed\FakeNameGenera tor.com_4d0a104d\FakeNameGenerator.com_4d0a104d.tx t"
    Dim objReader As New System****.StreamReader(FILE_NAME)
    Gender.Text = objReader.ReadToEnd


    Thanks it's works but the problem it's read all in text file i want it to ready just 1 line every click in Button
    Please replay
    Last edited by Hero; 07-01-2013 at 10:53 AM.

  5. #19
    Aly El-Haddad's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Egypt
    Posts
    67
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by samerlol View Post
    Hello Guys..

    Sorry i was busy, about the codes above



    This take a long time to make my program
    because i have 5 files and every file size between 7-11 MB
    and if i want to do this i did it but it's fail.




    and this is take long a time.





    Thanks it's works but the problem it's read all in text file i want it to ready just 1 line every click in Button
    Please replay


    Code:
            Dim path As String = "THE FILE PATH" 'The file path
            Dim reader As New IO.StreamReader(path)
            Dim lineIndex As Integer = 2 ' The index of the line that you want to read
            For i As Integer = 0 To lineIndex - 1
                reader.ReadLine()
            Next
            TextBox1.Text = reader.ReadLine

  6. #20
    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 Aly El-Haddad View Post
    Code:
    Dim path As String = "THE FILE PATH" 'The file path
    Dim reader As New IO.StreamReader(path)
    Dim lineIndex As Integer = 2 ' The index of the line that you want to read
    For i As Integer = 0 To lineIndex - 1
    reader.ReadLine()
    Next
    TextBox1.Text = reader.ReadLine
    man
    it's working but, it's ready 1 time and then stop reading
    like this
    when i press generate it's generate sami after this i press generate again no thing happened

  7. #21
    Aly El-Haddad's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Egypt
    Posts
    67
    Reputation
    10
    Thanks
    5
    Quote Originally Posted by samerlol View Post
    man
    it's working but, it's ready 1 time and then stop reading
    like this
    when i press generate it's generate sami after this i press generate again no thing happened
    It works whenever you call it!
    Code:
    Public Class Form1
    
        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            TextBox1.Text = ReadLineFromTxt("THE TXT FILE PATH", 0) '0 is the line index
        End Sub
    
        Public Shared Function ReadLineFromTxt(ByVal path As String, ByVal lineIndex As Integer) As String
            Dim reader As New IO.StreamReader(path)
            For I As Integer = 0 To lineIndex - 1
                reader.ReadLine()
            Next
            Return reader.ReadLine()
        End Function
    End Class

  8. The Following User Says Thank You to Aly El-Haddad For This Useful Post:

    samerlol (07-01-2013)

  9. #22
    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 Aly El-Haddad View Post
    Code:
    Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
    TextBox1.Text = ReadLineFromTxt("THE TXT FILE PATH", 0) '0 is the line index
    End Sub

    Public Shared Function ReadLineFromTxt(ByVal path As String, ByVal lineIndex As Integer) As String
    Dim reader As New IO.StreamReader(path)
    For I As Integer = 0 To lineIndex - 1
    reader.ReadLine()
    Next
    Return reader.ReadLine()
    End Function
    End Class
    man, same thing it's generate 1 time and then stop generate

  10. #23
    Aly El-Haddad's Avatar
    Join Date
    Mar 2011
    Gender
    male
    Location
    Egypt
    Posts
    67
    Reputation
    10
    Thanks
    5
    Bro, It's not my code's problem.. you may have something wrong in your generating code
    Or you may be calling the same line by entering the same index everytime

  11. #24
    samerlol's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    In somewhere
    Posts
    107
    Reputation
    14
    Thanks
    3
    My Mood
    Asleep
    ok, What i have to do ?

  12. #25
    Jorndel's Avatar
    Join Date
    Jul 2010
    Gender
    male
    Location
    Norway
    Posts
    8,676
    Reputation
    905
    Thanks
    19,112
    My Mood
    Angelic
    Quote Originally Posted by samerlol View Post
    ok, What i have to do ?
    He provided you with a working code but let's make it even easier for you to use


    Result:

     
    Contributor 01.27.2012 - N/A
    Donator 07-17-2012 - Current
    Editor/Manager 12-16-12 - N/A
    Minion 01-10-2013 - 07.17.13
    Former Staff 09-20-2012 - 01-10-2013 / 07-17-2013 - Current
    Cocksucker 20-04-2013 - N/A

  13. The Following 2 Users Say Thank You to Jorndel For This Useful Post:

    Matroix73 (07-01-2013),[MPGH]Mayion (07-01-2013)

  14. #26
    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 Jorndel View Post


    He provided you with a working code but let's make it even easier for you to use


    Result:


    Thanks for replay but it's same that what i want !!

    i will give you more information i need

    I have Files
    Gaven name
    Email
    Surname
    these file in wrote in .txt file

    This is pictures:


    And



    Uploaded with ImageShack.us


    i want when someone press(Hit) Generate Button
    generate one email, surname and Gaven name
    and if he press generate again give him new surname, email and gaven name

    and i have lists for all these username , passwords and more...

    This is image for my programs



    Please HElp

  15. #27
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    @OP Obviously this is far from final product, but I think this is the part you need help with?

    Basically,
    1. Instead of loading the .txt files on button_click, you should do it *only once* on start-up (form_load) - efficiency.
    2. Store the names in an array (or some other collection)
    3. Get a random item from the array (or collection) - using a random number generator to generate a random index into the array.
    -all I did so far.

     

    edit: "System . Io . File" (no spaces) becomes ******** - mpgh parsing error ?
    edit: file names are hard-coded in! At minimum change them to your file names! Even better, create consts.

    Public Class Form1

    Private _firstNames() As String = Nothing
    Private _lastNames() As String = Nothing
    Private _displayNames() As String = Nothing
    Private _namesLoaded As Boolean = False
    Private _rndm As New Random(420)

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    '' Load the files on start-up, not EVERY time you generate a name. <-- Unless you have reason(s) not to.
    If System****.File.Exists("fnames.txt") And System****.File.Exists("lnames.txt") And System****.File.Exists("dnames.txt") Then
    _firstNames = System****.File.ReadAllLines("fnames.txt")
    _lastNames = System****.File.ReadAllLines("lnames.txt")
    _displayNames = System****.File.ReadAllLines("dnames.txt")
    _namesLoaded = True '' SuCCESS
    Else
    MessageBox.Show("Username files are missing. Unable to continue. Critical error.")
    _namesLoaded = False '' FAIL
    End If
    End Sub

    Private Function GenerateRandomAccount() As UserAccount
    Dim _rtnAccount As UserAccount ' rtn value
    If _namesLoaded Then
    _rtnAccount.firstName = _firstNames(_rndm.Next(0, _firstNames.Length)) '' rndm indx
    _rtnAccount.lastName = _lastNames(_rndm.Next(0, _lastNames.Length)) '' rndm indx
    _rtnAccount.displayName = _displayNames(_rndm.Next(0, _displayNames.Length)) '' rndm indx
    Else
    _rtnAccount.firstName = "file not loaded"
    _rtnAccount.lastName = "file not loaded"
    _rtnAccount.displayName = "file not loaded"
    End If
    Return _rtnAccount
    End Function

    Private Sub cmdGenerate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdGenerate.Click
    Dim _newName As UserAccount = GenerateRandomAccount()
    lblFirstName.Text = _newName.firstName
    lblLastName.Text = _newName.lastName
    lblDisplayName.Text = _newName.displayName
    End Sub

    Private Structure UserAccount
    Dim firstName As String
    Dim lastName As String
    Dim displayName As String
    End Structure

    End Class

    edit: replace "lblFirstName.Text" (etc) with "txtFirstName.Text" for a text box ; )


    edit: anyone tell me the [highlight = vb ] bb code? Tried a few and couldn't get it, would be much appreciated for better formatting.
    Last edited by abuckau907; 07-01-2013 at 11:01 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  16. #28
    Womanizer`'s Avatar
    Join Date
    Apr 2008
    Gender
    male
    Posts
    1,438
    Reputation
    103
    Thanks
    1,593
    My Mood
    Angelic
    Quote Originally Posted by samerlol View Post
    There is no space i checked it, no space and if there is space Visual Basic Correct it Auto
    Not sure If anyone replied with this information, but I'd recommend using OpenFileDialog. Its much easier, more user friendly and you don't have to worry about putting a wrong path and then the whole program crashing.

  17. #29
    abuckau907's Avatar
    Join Date
    Dec 2012
    Gender
    male
    Location
    other side of the wire
    Posts
    1,342
    Reputation
    162
    Thanks
    239
    My Mood
    Cold
    It's a program for generating "random fake accounts" .....if he needs fake accounts, but can't manage the .txt files, shame on hiim : ) But you're correct.
    Last edited by abuckau907; 07-01-2013 at 10:57 AM.
    'Some things that can be counted, don't matter. And some things that matter, can't be counted' - A.E.
    --
     

    My posts have some inaccuracies/are wrong/wrong keyword(s) used.
    They're (maybe) pretty close, and I hope they helped you, not created confusion. Take with grain of salt.

    -if you give rep, please leave a comment, else it means less.

  18. #30
    samerlol's Avatar
    Join Date
    Mar 2013
    Gender
    male
    Location
    In somewhere
    Posts
    107
    Reputation
    14
    Thanks
    3
    My Mood
    Asleep
    Thanks you

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
    '' Load the files on start-up, not EVERY time you generate a name. <-- Unless you have reason(s) not to.
    If System****.File.Exists("fnames.txt") And System****.File.Exists("lnames.txt") And System****.File.Exists("dnames.txt") Then
    _firstNames = System****.File.ReadAllLines("fnames.txt")
    _lastNames = System****.File.ReadAllLines("lnames.txt")
    _displayNames = System****.File.ReadAllLines("dnames.txt")
    _namesLoaded = True '' SuCCESS
    Else
    MessageBox.Show("Username files are missing. Unable to continue. Critical error.")
    _namesLoaded = False '' FAIL
    End If
    End Sub
    I got error here why ??if it's because i changed the theme
    i used GhostTheme what the command will be ??

    i got A lot of errors !!

    ---------- Post added at 12:54 PM ---------- Previous post was at 12:39 PM ----------

    Event "load" cannot be Found

    ---------- Post added at 12:55 PM ---------- Previous post was at 12:54 PM ----------

    i think this method working but you have to give me more details(Information) about this step by step

    I am newbie !
    Last edited by samerlol; 07-01-2013 at 11:52 AM.

Page 2 of 3 FirstFirst 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