4,439 Posted Topics

Member Avatar for Kath_Fish

Line 27: Could you elaborate on the fact that you are using the ToString() method on an array that already contains strings?

Member Avatar for Kath_Fish
0
363
Member Avatar for xanawa

Perhaps you could try to construct your table with [url]http://www.daniweb.com/software-development/csharp/code/335171[/url] as a basis?

Member Avatar for xanawa
0
116
Member Avatar for Phil++

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 …

Member Avatar for ddanbe
0
110
Member Avatar for navimir
Member Avatar for NewOrder

Not bad! Do you drag your pieces, or do you just use the mouseclick event?

Member Avatar for NewOrder
0
111
Member Avatar for AdmiralDonkey

[QUOTE]Object reference not set to an instance of an object[/QUOTE] Cold you point out where that error in your code occured?

Member Avatar for AdmiralDonkey
0
468
Member Avatar for CrazyProgrammer

String is a reference type. Because it is used so often, the C# compiler works out all the details for you.

Member Avatar for CrazyProgrammer
0
158
Member Avatar for Phil++

Try this: [CODE=C#] private void checkBox1_CheckedChanged(object sender, EventArgs e) { CheckBox chBox = sender as CheckBox; square = chBox.Checked; } [/CODE]

Member Avatar for Momerath
0
91
Member Avatar for apanimesh061

You probably got to set the PATH variable in your environment. If by any means you can, use Visual Studio C#.

Member Avatar for ddanbe
0
183
Member Avatar for apanimesh061

Define easier. To paraphrase Einstein: "Keep it easy, but not easier"

Member Avatar for ddanbe
0
92
Member Avatar for Falcon25

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?

Member Avatar for Falcon25
0
79
Member Avatar for ashley11

The number of the beast? Well, almost ;) [url]http://www.dijksterhuis.org/formatting-strings-stringformat/[/url]

Member Avatar for ddanbe
0
65
Member Avatar for bia

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]

Member Avatar for ddanbe
0
54
Member Avatar for Carrots

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 …

Member Avatar for Carrots
0
2K
Member Avatar for Suzie999

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.

Member Avatar for Momerath
0
110
Member Avatar for vivekagrawal

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]

Member Avatar for vivekagrawal
0
132
Member Avatar for Ramesh.KR
Member Avatar for stefilina

You should consider learning a bit more about WPF (Windows Presentation Foundation) It was invented just for the things you like to do.

Member Avatar for stefilina
0
130
Member Avatar for Usmaan

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. :)

Member Avatar for ddanbe
0
129
Member Avatar for ddanbe

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 …

Member Avatar for Usmaan
0
720
Member Avatar for Mark_48

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?

Member Avatar for Mark_48
0
157
Member Avatar for sureshprg

Could it be you run your app on screens with different resolution than the screen you developped the app on?

Member Avatar for ddanbe
0
103
Member Avatar for Arjun_Sarankulu
Member Avatar for stefilina

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]

Member Avatar for stefilina
0
255
Member Avatar for Arjun_Sarankulu

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 …

Member Avatar for Arjun_Sarankulu
0
106
Member Avatar for leo88

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?

Member Avatar for Momerath
0
182
Member Avatar for Tazsweet19
Member Avatar for ddanbe
0
86
Member Avatar for himvj1

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]

Member Avatar for ddanbe
0
140
Member Avatar for Kath_Fish

Study this: [url]http://msdn.microsoft.com/en-us/library/bb460136.aspx[/url]

Member Avatar for ddanbe
0
93
Member Avatar for lxXTaCoXxl

And check this: [url]http://msdn.microsoft.com/en-us/library/aa730869(VS.80).aspx[/url]

Member Avatar for lxXTaCoXxl
0
130
Member Avatar for leo88

[url]http://msdn.microsoft.com/en-us/library/ms132319.aspx[/url] there is some code at the bottom of this article.

Member Avatar for Mitja Bonca
0
180
Member Avatar for vivekagrawal

Hi vivekagrawal, welcome here :) Plenty of that if you search this site. Example: [url]http://www.daniweb.com/software-development/csharp/code/217193[/url]

Member Avatar for vivekagrawal
0
336
Member Avatar for vmanes
Member Avatar for Lardmeister
0
600
Member Avatar for shack99
Member Avatar for leo88

To split a string like "12345" in other strings is not possible. You can split a string in chars if you want to.

Member Avatar for Mitja Bonca
0
2K
Member Avatar for JeroenvDijk

[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 . . .

Member Avatar for ddanbe
1
595
Member Avatar for mrnobody
Member Avatar for mrnobody
0
146
Member Avatar for Nerathas

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++) …

Member Avatar for ddanbe
0
2K
Member Avatar for shyla

You mean something like this? [CODE=C#]public void arrayMath(double[] myArray, out double avg) { avg = myArray.Average(); }[/CODE]

Member Avatar for ddanbe
0
112
Member Avatar for Suzie999

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?

Member Avatar for Suzie999
0
120
Member Avatar for lxXTaCoXxl

Have a look here: [url]http://msdn.microsoft.com/en-us/library/aa730869(VS.80).aspx[/url]

Member Avatar for ddanbe
0
99
Member Avatar for Dragazarth

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. } …

Member Avatar for Dragazarth
0
321
Member Avatar for shyla

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:

Member Avatar for ddanbe
0
88
Member Avatar for techturtle

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 …

Member Avatar for techturtle
0
407
Member Avatar for shyla

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.

Member Avatar for shyla
0
88
Member Avatar for orim0109

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.

Member Avatar for orim0109
0
70
Member Avatar for arunair

DateTime has a Compare method. DateTime also has some operator overloads like == to test two dates for equality. There is also the TimeSpan structure.

Member Avatar for arunair
0
199
Member Avatar for shyla

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 , …

Member Avatar for shyla
0
700
Member Avatar for rannamaa

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.

Member Avatar for rannamaa
0
206
Member Avatar for getmepaid

Something like [url=http://unicode.org/charts/PDF/U0600.pdf]this?[/url]

Member Avatar for getmepaid
0
192

The End.