4,439 Posted Topics

Member Avatar for OsheRono

Hi, OsheRono! Welcome at Daniweb. Another way to do this (if I understand your post well) is to use a set of radiobuttons in a GroupBox control.

Member Avatar for Geekitygeek
0
200
Member Avatar for abubeker

If you are in your final year and you still have not picked up a part of your studies which interests you (and hence would give you a clue for a subject for a project), you should better quit studying.

Member Avatar for Geekitygeek
-2
125
Member Avatar for PRINCE01

[url=http://mathbits.com/MathBits/CompSci/Introduction/frombase10.htm]This site[/url] should give you a very good idea how to do it. Hint: Try to remember the outcome of your divisions and then print them out.

Member Avatar for PRINCE01
0
318
Member Avatar for max1million

You could use the shift left operator << here! Math.Power is a very "expensive" function to call. Convert.ToInt32((Math.Pow(2, i) should give the same as 1<< i [CODE=c#] a = Convert.ToInt32((Math.Pow(2, i); b = 1 << i; //multyply by 2 by shifting 1 bit to the left // a and b …

Member Avatar for ddanbe
0
220
Member Avatar for rajeshswain

3D is a world of it's own. I suggest first reading "3D programming for windows" from Charles Petzold. Learn about the math needed(quaternions ! fun!) Learn about projections, light, shade, viewports, rotation etc. Mostly with XAML code but also C# code. Very good book.

Member Avatar for superbokey
0
560
Member Avatar for checho

@apegram : In case you did not know(which I doubt) you just set out all the combinations of 5 elements in groups of 1 to 5 without repetition! [url=http://en.wikipedia.org/wiki/Combinations]Look here.[/url] Was working on this same problem using the combinatorial approach(trying to write a combination method:-/ ) and with your list …

Member Avatar for checho
1
741
Member Avatar for forhacksf

Hi forhacksf, welcome at daniweb! Have a look at this thread: [url]http://www.daniweb.com/forums/thread201807.html[/url]. It is not about your problem but it contains a zip file somewhere of a calculator in C# that might give you some ideas. It is a "clone" of a little pocket calculator I have at home not …

Member Avatar for Geekitygeek
0
248
Member Avatar for thuyson

Hi thuyson, welcome at daniweb! Do you mean you want to show the contents of a textbox in a different place on the same form, by clicking a button?

Member Avatar for thuyson
0
192
Member Avatar for ernst1234

Hi ernst1234, welcome at daniweb! Please use code tags when you post code. Use the Location property of the Label to move it. You have to use the Refresh() method of the form to make that happen.

Member Avatar for Geekitygeek
0
157
Member Avatar for loliana

[B]1.[/B] You could see them as "placeholders" [CODE=c#] int a = 23; int b = 34; Console.WriteLine("Result is {0}, second result is {1}.", a ,b );[/CODE]will produce: [B]Result is 23, second result is 34.[/B] 2. ToString is a basic method all objects have. Because everything is C# is an object …

Member Avatar for ddanbe
0
111
Member Avatar for ejazmusavi

Your Paint event handler does just what you told it to do: Draw a green line with a width of ten, from the point you did a mousedown until the point you released the mouse. Reread the advise Ryshad gave you in your previous thread about this subject: [url]http://www.daniweb.com/forums/thread261808.html[/url]

Member Avatar for Diamonddrake
0
573
Member Avatar for ddanbe

There seems to be a lot of shuffling going around here lately. So I looked [url=http://en.wikipedia.org/wiki/Shuffling]here[/url] to learn about the Fisher-Yates shuffle etc. But unless my English is not good enough I did not find anything about the way we shuffle a card deck here. Take a deck in your …

Member Avatar for ddanbe
2
779
Member Avatar for andrew2325

Hi andrew2325, welcome here at daniweb! I should try to use a list of struct instead of string, like this: [CODE=c#] struct GradeStruct { string name; int one; int two; int three; } List<GradeStruct> MyGrades = new List<GradeStruct>();[/CODE] Read a line of your file and split it into 4 strings …

Member Avatar for Geekitygeek
0
167
Member Avatar for ejazmusavi

@ejazmusavi In case you do not know, live itself is not easy! Try to learn as much as you can, maybe from something you don't understand completely at first. If you have a question: ask!

Member Avatar for Geekitygeek
0
189
Member Avatar for Egypt Pharaoh

Off course you can always save you the trouble of doing it yourself and use format specifiers like this: int value = 32767; Console.WriteLine("{0,10:G}: {0,10 : X}", value); Which will output: 32767: 7FFF

Member Avatar for NightCrawler03X
0
411
Member Avatar for Nerathas

For a starter, leave out the for loop on line 14. Change the i in lines 16 and 17 into AantalRijen. This should perhaps already help you out a bit. Keep you informed but have not much time right now. Succes gewenst!

Member Avatar for ddanbe
0
115
Member Avatar for Mahen
Member Avatar for makachuki

Make a windows form application, drop a button on it from the toolbox and see what code is generated in the XXX.designer.cs file. Should give you a start. This is the way I did it to find out some things. Succes!

Member Avatar for ddanbe
0
298
Member Avatar for Dragonator

Hi Dragonator, welcome here at daniweb! It just so happens I'm working on a matrix calculator project. Well not all the time of course;) And it is far from finished! I use a class derived from DataGridView to show or edit a matrix. I may have my the code here …

Member Avatar for Dragonator
0
1K
Member Avatar for BradenMurphy

I believe .NET can do most of what you want to do. Look at this little snippet for an example: [url]http://www.daniweb.com/code/snippet217413.html[/url] If this is not what you really want --> Google For example: [url]http://www.downloadjunction.com/product/software/28425/index.html[/url] Succes!

Member Avatar for ddanbe
0
109
Member Avatar for toko

Seems you are putting your own code in your XXX.designer.cs file. You should do that in the XXX.cs file. The XXX.designer.cs file is maintained by Visual Studio, it may overwrite anything you put in there.

Member Avatar for toko
0
102
Member Avatar for JohnnyT

[QUOTE=Narue]Your first example is a syntax error because it's neither a method nor a property[/QUOTE] Although the rest of your explanation is quite good, I was asking myself, why must a method have parameters? IMO it can be parameterless, or did you mean something totally different?

Member Avatar for JohnnyT
0
131
Member Avatar for redbluffsandi

Coud you be more specific? You also seem to have posted double code.

Member Avatar for ddanbe
0
116
Member Avatar for Acute

Perhaps you can get some ideas looking at [url=http://www.daniweb.com/code/snippet217413.html]this snippet[/url]?

Member Avatar for ddanbe
0
719
Member Avatar for edgias

Check out this snippet [url]http://www.daniweb.com/code/snippet217084.html[/url] it is about numerics, but perhaps it helps.

Member Avatar for ddanbe
0
118
Member Avatar for apegram
Member Avatar for ROTC89

Perhaps this would be a good time to learn some more C# and get to know something more about properties e.g.: [url]http://www.csharp-station.com/Tutorials/Lesson10.aspx[/url]

Member Avatar for ROTC89
0
115
Member Avatar for Acute

Put your code in the Form1_Paint method. Leave out the CreateGraphics, the EventArgs argument is kind enough to provide you one : e.Graphics The OnPaint method calls the Paint event of the form so I would leave that for now. You should have a KeyDown event handler where you could …

Member Avatar for Geekitygeek
0
408
Member Avatar for bmasta12

Hi bmasta12 welcome. Could you to help us, use code tags to show us your code? Leave the upper case coding style. Tell me what is more readable: ACADEMIC_PROFILE ACADEMIC_PROFILE_SCREEN = new ACADEMIC_PROFILE(); AcademicProfile AcademicProfileScreen = new AcademicProfile(); and if I use that between code tags I get: [CODE=c#]AcademicProfile AcademicProfileScreen …

Member Avatar for Geekitygeek
0
112
Member Avatar for Egypt Pharaoh

This is a great article about color : [url]http://www.codeproject.com/KB/recipes/colorspace1.aspx#hsb[/url]

Member Avatar for ddanbe
0
81
Member Avatar for GAME

Every textbox has a MaxLength property you could test for . Default it is set to 32767 chars.

Member Avatar for RunTimeError
0
113
Member Avatar for GAME

Why can't you put all your textboxes in a list? Like this: [CODE=c#]List<TextBox> MyTBList = new List<TextBox>();[/CODE]Look up what you can do with a List, you will be suprised!

Member Avatar for apegram
0
163
Member Avatar for ojung

First you have to extract a word from your text file. Second compare it with the word you want to search. true?-->found! false?-->extract the next word from the file and compare again etc. until the end of file is reached.

Member Avatar for onksssss
0
10K
Member Avatar for danieldot

If you know all your strings start with "x", you could use: [CODE=c#]string test = "x11"; test = test.Remove(0, 1);//remove 1 char at position 0 int i = int.Parse(test);[/CODE]

Member Avatar for danieldot
0
155
Member Avatar for Someone123

Do you mean a Form class? Here is some info about its members: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.form_members.aspx[/url]

Member Avatar for ddanbe
0
33
Member Avatar for danieldot

Comment on the side: never use [B]o[/B] as an index variable! Can be confused with 0 (tell me: is this the letter o or the digit o?) I used to program in FORTRAN IV. If you used a letter like I, J, K... it was an integer. I think these …

Member Avatar for danieldot
0
98
Member Avatar for rockiesmagicnum

I think you cannot define a class in Main, so define it outside of it. EDIT: apegram just passed 2 secs before me, but I can live with that...

Member Avatar for rockiesmagicnum
0
62
Member Avatar for tom23

What have you tried for yourself already, or are you completely lost about this?

Member Avatar for ddanbe
0
88
Member Avatar for Acute

Depends on what you want. You could build it from scratch, so you have all the control. You could also try to use a TableLayout or even a DataGridView control.

Member Avatar for Geekitygeek
0
61
Member Avatar for kiranbvsn

Do you mean a GridView or DataGridView? What have you already tried for yourself? I did the effort of googling for [I]DataGridView[/I] and came up with: [url]http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridview.aspx[/url]

Member Avatar for kiranbvsn
-1
73
Member Avatar for NewbyOneCanuby

If I understand you well, I should have a Horse class, and put it in a List of Horses. Every Horse should have(among others) an int property Track(or something) giving you the track number.

Member Avatar for NewbyOneCanuby
-1
192
Member Avatar for ticktock

Check out the code snippet section. Among others: [url]http://www.daniweb.com/code/snippet217084.html[/url]

Member Avatar for ticktock
0
180
Member Avatar for iNach

Perhaps java substring works a little different, this is a translation to C#: [CODE=c#]using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace MonthStrings { class Program { static void Main(string[] args) { string monthString = "JanFebMarAprMayJunJulAugSepOctNovDec"; Console.WriteLine("Enter a month: "); string answer = Console.ReadLine(); int mon; bool succes = int.TryParse(answer, …

Member Avatar for Geekitygeek
0
137
Member Avatar for brettbed

Maybe [url=http://blog.figmentengine.com/2008/09/finding-duplictes-in-array.html]this article[/url] will help also.

Member Avatar for brettbed
0
486
Member Avatar for Cardinals1980

koekoeksklok, (translation: cuckoo clock :?: ) I live near Antwerp, have many friends there. If you want to become my friend, don't do this again and read the forum policies as Ryshad already pointed out.

Member Avatar for ddanbe
0
106
Member Avatar for VJ APU

The problem is with your string array declaration. string[] fNamearray = null; According to this definition [B]DataType[] VariableName = new DataType[Number];[/B]this should be something like: string[] fNamearray = new string[10]; See also : [url]http://www.functionx.com/csharp/Lesson21.htm[/url]

Member Avatar for VJ APU
0
180
Member Avatar for templersstorms

Do not see directly what you have trouble with : The example you give just constructs a string with Rowindex and ColumnIndex data which it gets from the [B]e [/B]parameter which is of type DataGridViewCellEventArgs . Then this string is displayed in the MessageBox.

Member Avatar for Geekitygeek
0
5K
Member Avatar for jackjones

Maybe [url=http://msdn.microsoft.com/en-us/library/aa289152(VS.71).aspx]this article[/url] can help?

Member Avatar for ddanbe
0
221
Member Avatar for songweaver

PrintArray is declared once on line 36. It is called twice on lines 17 and 19. Once to print out the unsorted array. Once to print out the sorted array.

Member Avatar for ddanbe
0
105
Member Avatar for sidd.

Rounding is in fact a rather complicated matter. [url=http://en.wikipedia.org/wiki/Rounding]Look here.[/url]

Member Avatar for Geekitygeek
0
197

The End.