Post: Whats Wrong With This Code? C#
10-29-2011, 02:51 AM #1
Jeremy
Former Staff
(adsbygoogle = window.adsbygoogle || []).push({}); using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace Browser
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


private void toolStripButton1_Click(object sender, EventArgs e)
{
webBrowser1.GoBack();
}


private void toolStripButton2_Click(object sender, EventArgs e)
{
webBrowser1.GoForward();
}


private void toolStripButton3_Click(object sender, EventArgs e)
{
webBrowser1.Refresh();
}


private void toolStripButton5_Click(object sender, EventArgs e)
{
webBrowser1.Stop();
}


private void toolStripButton4_Click(object sender, EventArgs e)
{
webBrowser1.Navigate ([url]https://www.google.com);[/url]
}


private void button2_Click(object sender, EventArgs e)
{ <<<<< Visual Express is saying theres a problem with that } right there

webBrowser1.Navigate ("https://www.google.com/search?sourceid=navclient&ie=UTF-8&rlz=1T4TSNA_...*5&q" + (textBox1.Text));
}
}
}
(adsbygoogle = window.adsbygoogle || []).push({});
10-29-2011, 03:00 AM #2
Pichu
RIP PICHU.
Well for one you have a space between .Navigate_([url]Http://www.google.com);[/url]

Close that. I don't see any other issues here.

---------- Post added at 08:00 PM ---------- Previous post was at 08:00 PM ----------

Originally posted by Advisable View Post
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace Browser
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


private void toolStripButton1_Click(object sender, EventArgs e)
{
webBrowser1.GoBack();
}


private void toolStripButton2_Click(object sender, EventArgs e)
{
webBrowser1.GoForward();
}


private void toolStripButton3_Click(object sender, EventArgs e)
{
webBrowser1.Refresh();
}


private void toolStripButton5_Click(object sender, EventArgs e)
{
webBrowser1.Stop();
}


private void toolStripButton4_Click(object sender, EventArgs e)
{
webBrowser1.Navigate ([url]https://www.google.com);[/url]
}


private void button2_Click(object sender, EventArgs e)
{ <<<<< Visual Express is saying theres a problem with that } right there

webBrowser1.Navigate ("https://www.google.com/search?sourceid=navclient&ie=UTF-8&rlz=1T4TSNA_...*5&q" + (textBox1.Text));
}
}
}


Forgot to quote
10-29-2011, 03:03 AM #3
Jeremy
Former Staff
Originally posted by Sublimity View Post
Well for one you have a space between .Navigate_([url]Http://www.google.com);[/url]

Close that. I don't see any other issues here.

---------- Post added at 08:00 PM ---------- Previous post was at 08:00 PM ----------



Forgot to quote
I fixed that but i still have the error :cry:
10-29-2011, 03:35 AM #4
Pichu
RIP PICHU.
Originally posted by Advisable View Post
I fixed that but i still have the error :cry:


Delete the button2 code and then double click it again to generate the code once more and then try and build.

---------- Post added at 08:35 PM ---------- Previous post was at 08:11 PM ----------

Originally posted by Advisable View Post
I fixed that but i still have the error :cry:


Going to say this about your signature. Don't say "My languages" if you can't fix something as simple as this. Obviously you just started coding with this and if you have Visual Basic or C++ experience this should have been fixed without any issue. may want to remove VB.NET, C# and C++ from your "Languages" in signature lol.

The following 2 users say thank you to Pichu for this useful post:

Epic?, xVz

The following 2 users groaned at Pichu for this awful post:

Jeremy, Scouse_Dom
10-29-2011, 03:42 AM #5
Epic?
Awe-Inspiring
Originally posted by Advisable View Post
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;


namespace Browser
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}


private void toolStripButton1_Click(object sender, EventArgs e)
{
webBrowser1.GoBack();
}


private void toolStripButton2_Click(object sender, EventArgs e)
{
webBrowser1.GoForward();
}


private void toolStripButton3_Click(object sender, EventArgs e)
{
webBrowser1.Refresh();
}


private void toolStripButton5_Click(object sender, EventArgs e)
{
webBrowser1.Stop();
}


private void toolStripButton4_Click(object sender, EventArgs e)
{
webBrowser1.Navigate ([url]https://www.google.com);[/url]
}


private void button2_Click(object sender, EventArgs e)
{ <<<<< Visual Express is saying theres a problem with that } right there

webBrowser1.Navigate ("https://www.google.com/search?sourceid=navclient&ie=UTF-8&rlz=1T4TSNA_...*5&q" + (textBox1.Text));
}
}
}

Well, you see there's a lot of problems with that code. First off, you have unnecessary "using" directives, which means you probably also are including unnecessary files in your project. Furthermore, you're not renaming any of your objects. Continuing on, there's a space between the .Navigate and the opening parenthesis, furthermore, the URL isn't wrapped in quotation marks. Furthermore, where you mark the "problem" you state its an error with the closing curly bracket, but you point to the opening bracket. Furthermore, you never actually post your error, and you don't put your code in CODE tags. You're giving us an impossible situation to help you with.

The following user thanked Epic? for this useful post:

Pichu

The following user groaned Epic? for this awful post:

Jeremy
10-29-2011, 03:48 AM #6
Pichu
RIP PICHU.
Originally posted by Epic
Well, you see there's a lot of problems with that code. First off, you have unnecessary "using" directives, which means you probably also are including unnecessary files in your project. Furthermore, you're not renaming any of your objects. Continuing on, there's a space between the .Navigate and the opening parenthesis, furthermore, the URL isn't wrapped in quotation marks. Furthermore, where you mark the "problem" you state its an error with the closing curly bracket, but you point to the opening bracket. Furthermore, you never actually post your error, and you don't put your code in CODE tags. You're giving us an impossible situation to help you with.


Looked over it a bit more than I did just because it wasn't placed in code tags...

His best bet, since he isn't anywhere with this project is just to start a new project. I'm guessing he most likely setup the entire browsers design and now is adding the code.
10-29-2011, 03:50 AM #7
Epic?
Awe-Inspiring
Originally posted by Sublimity View Post
Looked over it a bit more than I did just because it wasn't placed in code tags...

His best bet, since he isn't anywhere with this project is just to start a new project. I'm guessing he most likely setup the entire browsers design and now is adding the code.


His best bet is to spend his time doing something productive. We really don't need more crappy browsers that use IE floating around.
10-29-2011, 03:56 AM #8
Pichu
RIP PICHU.
Originally posted by Epic
His best bet is to spend his time doing something productive. We really don't need more crappy browsers that use IE floating around.


Yea, I agree. There is essentially no real coding that even goes behind this. It would just be easier to open up Internet Explorer and browse that way, hell it would be even more secure than the browser application.

Maybe making a simple game like hangman or a mouse recorder to teach him multiple things.
10-29-2011, 08:57 PM #9
Woof
...hmm
Originally posted by Epic
His best bet is to spend his time doing something productive. We really don't need more crappy browsers that use IE floating around.


Originally posted by Sublimity View Post
Yea, I agree. There is essentially no real coding that even goes behind this. It would just be easier to open up Internet Explorer and browse that way, hell it would be even more secure than the browser application.

Maybe making a simple game like hangman or a mouse recorder to teach him multiple things.


You both sound like you're in you're 80's...
There is no point kicking this guy when he is down already, everybody starts somewhere, anyways I don't see you guys being very creative with your productivity.

The following user thanked Woof for this useful post:

Jeremy

The following 2 users groaned at Woof for this awful post:

Epic?, Pichu
10-30-2011, 07:49 AM #10
Pichu
RIP PICHU.
Originally posted by BFresshh View Post
You both sound like you're in you're 80's...
There is no point kicking this guy when he is down already, everybody starts somewhere, anyways I don't see you guys being very creative with your productivity.


First off, grammar correction, you used "you're" correctly the first time second time it should have been "your". Now, I am 17 years old.

To the productivity, I think Epic and I contribute a bit more here than others, with being creative with my productivity, I gave out the only Black Ops level calculator application (created by me). You search google and I'll bet anything you will never find someone else who has made one, (Not talking about a ratio calculator though).

Now with creativity as well, I am creating and developing a MW3 Toolkit. How's that for use of creativity and productivity? Hmm...

Now if you are criticizing us about it, what about you?

Copyright © 2026, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo