Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
100% Quality Score
Upvotes Received
1
Posts with Upvotes
1
Upvoting Members
1
Downvotes Received
0
Posts with Downvotes
0
Downvoting Members
0
0 Endorsements
Ranked #2K
~2K People Reached
Favorite Forums

10 Posted Topics

Member Avatar for ereruh

Hey. As the topic states i want to use a streamwriter to write the listbox from form1, but the streamwriter is in form2. How do i get the data from form1 to form2? I have the code to write everything out etc, all I need is help to get the …

Member Avatar for can-inlife
0
144
Member Avatar for AngelicOne

Do you want it so that if you press enter in your textbox it will click a button for you? If so you can use the following: [CODE]private void txtBox_keyDown(object sender, KeyEventArgs e) { if (e.KeyValue == 13) //13 = enter { button1.PerformClick(); } }[/CODE] If this is not what …

Member Avatar for AngelicOne
0
177
Member Avatar for virusisfound

In the solution explorer double click Program.cs (or right click and "View Code") There you will find: Application.Run(new Form1()); now change it to: Application.Run(new Form4());

Member Avatar for nick.crane
0
113
Member Avatar for Code_GrasssHopp

It's a bit off-topic but could you please explain what the "@" is for in: string filename = @"C:\Temp\arrayfile.txt"; I believe I've done similar things without the @ and it works as it should but I've also seen many people using it pretty often, what exactly does it do? Thanks.

Member Avatar for Code_GrasssHopp
0
712
Member Avatar for mahdi68

I think it's because the Form_Load event happens before the form itself is shown, therefore there is nothing to hide. I'm not sure but that's my guess, I don't have a solution for you yet though. I'm sure someone here will come up with something soon.

Member Avatar for nick.crane
0
82
Member Avatar for ereruh

Hey. I would like to save a txt file from the listbox into a folder that the user chooses. I've got the writing to work, but so far it only saves the file to the debug folder (since I haven't specified another folder) This is what I have so far: …

Member Avatar for ereruh
0
248
Member Avatar for GAME

If both textboxes have 4 - 20 characters the button is enabled. [CODE]private void textbox_keyUp(object sender, KeyEventArgs e) //add event to both textboxes { if (txtUser.Text.Length >= 4 && txtUser.Text.Length < 20) { if (txtPass.Text.Length >= 4 && txtPass.Text.Length < 20) { btnLogin.Enabled = true; } else { btnLogin.Enabled = …

Member Avatar for ereruh
0
156
Member Avatar for GAME

Not completely sure what you're after but if you want to check if it's between 4 and 20 you could use: [CODE] if (txtUser.Text.Length >= 4 && txtUser.Text.Length < 20) { } [/CODE]

Member Avatar for ereruh
0
127
Member Avatar for ereruh

Hey. I'm making a Hangman and I have this code to retrieve a random word from a txt file: [CODE] private void ord() { Random random = new Random(); StreamReader read = new StreamReader("sweord.txt"); ArrayList lines = new ArrayList(); string line; while ((line = read.ReadLine()) != null) lines.Add(line); read.Close(); int …

Member Avatar for ereruh
0
164
Member Avatar for ereruh

Hey. I'm pretty new to C# and programming overall. I'm trying to make a Hangman game. Let's say the user want to make a guess at the letter "t". Then he should just have to press "t" on his keyboard and the form should recognize it. I currently can't even …

Member Avatar for ereruh
0
147

The End.