4,439 Posted Topics
Re: Line 27: Could you elaborate on the fact that you are using the ToString() method on an array that already contains strings? | |
Re: Perhaps you could try to construct your table with [url]http://www.daniweb.com/software-development/csharp/code/335171[/url] as a basis? | |
Re: Drop a PictureBox on your from and set up its Paint event handler like this [CODE=C#]private void pictureBox1_Paint(object sender, PaintEventArgs e) { Graphics g = e.Graphics; Pen bluePen = new Pen(Color.Blue, 2); g.DrawRectangle(bluePen, 10, 10, 50, 20); } [/CODE] It will draw a nice blue rectangle with a blue pen … | |
Re: You need an extra using statement: [CODE=c#]using System.IO;[/CODE] | |
Re: Not bad! Do you drag your pieces, or do you just use the mouseclick event? | |
Re: [QUOTE]Object reference not set to an instance of an object[/QUOTE] Cold you point out where that error in your code occured? | |
Re: String is a reference type. Because it is used so often, the C# compiler works out all the details for you. | |
Re: Try this: [CODE=C#] private void checkBox1_CheckedChanged(object sender, EventArgs e) { CheckBox chBox = sender as CheckBox; square = chBox.Checked; } [/CODE] | |
Re: You probably got to set the PATH variable in your environment. If by any means you can, use Visual Studio C#. | |
Re: Define easier. To paraphrase Einstein: "Keep it easy, but not easier" | |
![]() | Re: This may help: [url]http://en.wikipedia.org/wiki/Constructor_(computer_science)#Example_3[/url] Perhaps you could show the code you are having trouble with? ![]() |
Re: The number of the beast? Well, almost ;) [url]http://www.dijksterhuis.org/formatting-strings-stringformat/[/url] | |
Re: Because the [B]System.String [/B]class is used so often it even has an alias: [B]string[/B] More info here also: [url]http://msdn.microsoft.com/en-us/library/362314fe(v=VS.100).aspx[/url] | |
Re: Learn here wath an application Run method does: [url]http://www.daniweb.com/software-development/csharp/code/217165[/url] I think the word program confuses you and you believe that it is there where all the action is taking place. In fact a lot is happening there, but consider it a black box. Concentrate on your form code. In your … | |
Re: You instantiated [B]eclass [/B]as [B]first [/B]local to your Main method. The method [B]setup [/B]never can see [B]first[/B]. If you want that behaviour take line 13 out of the Main method and put it before it but still in the class program. | |
Re: You can click the following code as many times as your computer memory will allow it. You will have as many forms. [CODE=C#]private void button1_Click(object sender, EventArgs e) { Form f = new Form(); f.Show(); } [/CODE] | |
Re: You should consider learning a bit more about WPF (Windows Presentation Foundation) It was invented just for the things you like to do. | |
Re: Made some small snippet some time ago: [url]http://www.daniweb.com/software-development/csharp/code/217165[/url] Maybe it can help, it looks like fun in what you are trying to achieve, but I [U]personally[/U] would not make it my final. :) | |
You can get your hands on to usefull information from within your C# program. Use the static System.Environment class! Take a look at this snippet, which can be used as is in a Console application. I have not exhausted all the possibilities, if you want you can look them up … | |
Re: Hi Mark522 welcome at DaniWeb! Some remarks: line 22 loops forever, I think it is your intention to keep the console on the screen. I use Console.ReadKey(); in debugmode for that. Also you have one long list of data. How many columns you have? | |
Re: Could it be you run your app on screens with different resolution than the screen you developped the app on? | |
Re: Do something like this: [CODE=c#] private void button1_Click_1(object sender, EventArgs e) { // increment form height by 20 this.Height += 20; //change heigth and location of button clicked Button btn = sender as Button; btn.Height += 10; btn.Location = new Point(50, 50); }[/CODE] | |
Re: The Split method cannot find a ',' (comma) character to split your string, so it returns the whole string. That is why the arraytempline2 string array returns 1 as Length. arraytempline2[0] = s I think it's better to use the LastIndexOf method, looking for a space and then chop your … | |
Re: This question has a remarkable likeness with [url]http://www.daniweb.com/software-development/csharp/threads/356505[/url] You are both from Pahang Malaysia. Maybe you are sitting next to each other in class? | |
Re: Do you want a priority queue? Have you any code for the consoleapplication yet? | |
Re: Hi, himvj1 welcome here! :) This article has some sample code: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewlinkcolumn.aspx[/url] And this is an overview of all the column types of a DataGridView: [url]http://msdn.microsoft.com/en-us/library/bxt3k60s.aspx[/url] | |
Re: Study this: [url]http://msdn.microsoft.com/en-us/library/bb460136.aspx[/url] | |
Re: And check this: [url]http://msdn.microsoft.com/en-us/library/aa730869(VS.80).aspx[/url] | |
Re: [url]http://msdn.microsoft.com/en-us/library/ms132319.aspx[/url] there is some code at the bottom of this article. | |
Re: Hi vivekagrawal, welcome here :) Plenty of that if you search this site. Example: [url]http://www.daniweb.com/software-development/csharp/code/217193[/url] | |
Re: This is a classic I guess: [B]IF YOU CAN READ THIS, YOU ARE TOO CLOSE![/B] | |
| |
Re: To split a string like "12345" in other strings is not possible. You can split a string in chars if you want to. | |
Re: [QUOTE=JeroenvDijck]For my graduation project I had to do a literature study.[/QUOTE] Literature list Robert C. Martin Clean Code, A Handbook of Agile Software Craftsmanship First edition, August 2008 Two books? Very impressive for a litterature study . . . | |
Re: Your zip folder appears to be empty. Is IOList a type from the IOHandler class? | |
Re: Construct a list of the divisors of a number, [CODE=c#]using System; using System.Collections.Generic; namespace ConsoleApplication2 { class Program { static void Main(string[] args) { int number = 143; // number input List<int> divs = new List<int>(); // the list of divisors for (int i = 1; i <= number; i++) … | |
Re: You mean something like this? [CODE=C#]public void arrayMath(double[] myArray, out double avg) { avg = myArray.Average(); }[/CODE] | |
Re: What seems to be a SPACE char is not always a SPACE char. Did you perform a hexdump on your strings to find that out? | |
Re: Have a look here: [url]http://msdn.microsoft.com/en-us/library/aa730869(VS.80).aspx[/url] | |
Re: Start with making an array of buttons: [CODE=C#]Button[] MyButtons = new Button[9]; private void InitButtons() { for (int i = 0; i < 9; i++) { MyButtons[i] = new Button(); MyButtons[i].Name = "button" + i.ToString(); MyButtons[i].Location = new Point(50 + 10 * i, 50); // MyButtons[i].Size.... // MyButtons[i].Text etc. } … | |
Re: The return statement on line 51 forms part of the foreach statement on line 49. Use brases and you'll see it. What more, you are calling displayArray recursivly. This method would go on forever. BTW. it is UI not GUI. :angry: | |
Re: Believe me I'm a nice guy :) Just wondering...(I'm a sort of user interface guy) (Not GUI please!!!) My question: why would you show info from a DB in the form of checkboxes and radiobuttons? These UI objects are meant to be interactive with the user, so why make them … | |
Re: You also have to make your count variable on line 35 global to the Program class. The array may be filled with less than 8 elements. | |
Re: This can only mean one thing: args.Length(line 13) is less than 2. You can test this againby changing the string to "hello world" in the WriteLine that follows. | |
Re: DateTime has a Compare method. DateTime also has some operator overloads like == to test two dates for equality. There is also the TimeSpan structure. | |
Re: I hate the word GUI! Even a ConsoleApp is in fact a GUI! Give me some time and I will draw an easter bunny in it! We don't use [url=http://en.wikipedia.org/wiki/Teletype]these[/url] so often any more. [QUOTE=shyla]a method to accept an input and return the type of wood 'm' for mahogany , … | |
Re: Put this above your if statement on line 3 [CODE=c#]Circle Mycircle = obj as Circle;[/CODE] In the if statement use: . . . this.radius.Equals(Mycircle.radius) . . . Must say, I have not tested it. | |
Re: Something like [url=http://unicode.org/charts/PDF/U0600.pdf]this?[/url] |
The End.