Matroix73 (06-30-2013)
Matroix73 (06-30-2013)
Hello Guys..
Sorry i was busy, about the codes above
This take a long time to make my programCode:
Textbox1.Text = "anything goes here"
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.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()
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.
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
samerlol (07-01-2013)
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
ok, What i have to do ?
Matroix73 (07-01-2013),[MPGH]Mayion (07-01-2013)
Thanks for replay but it's same that what i want !!
i will give you more information i need
I have Files
Gaven name
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
@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: 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.
--
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.
--
Thanks you
I got error here why ??if it's because i changed the themePrivate 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 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.