4,439 Posted Topics

Member Avatar for ddanbe

Hi all, I know I can make a color lighter programatically, by augmenting some of the RGB values. But is there a standard way to do so or is it just trial and error? And why is a blue component needed to make orange lighter? Perhaps C# .NET has some …

Member Avatar for pvladov
0
1K
Member Avatar for BablooDabloo
Member Avatar for badboy515

Sigh, this seems to be a never never never ending story... From 1 year ago : http://www.daniweb.com/software-development/csharp/threads/321451/error-when-drawing-a-mandelbrot-to-a-bitmap

Member Avatar for ddanbe
0
272
Member Avatar for Ancient Dragon

If it consists of a bunch of CDs, use them as something to put your drinks on, just to keep your table clean. :o)

Member Avatar for BigPaw
0
110
Member Avatar for salford6129
Member Avatar for Indianblues

Use the Validated or Validating events of your textbox. Something like: private void Mytextbox_Validating(object sender,CancelEventAgrs e) { //check for int //if not int: // e.Cancel = true; // MessageBox.Show("You need to enter an integer"); }

Member Avatar for Michael27
0
517
Member Avatar for Michael27

Sorry for the late response, (I was quite ill lately) I once wrote this snippet: http://www.daniweb.com/software-development/csharp/code/217265/capturing-numeric-input-in-a-textbox

Member Avatar for Michael27
2
249
Member Avatar for lilwizz770

Google **basic c# programming** and a plethora of tutorials will be at your disposition

Member Avatar for Michael27
0
115
Member Avatar for de Source

A way to do what I guess you want is: string str; int i = -1; str = "10"; // value of a certain index in your stringarray switch ( str) { case "00": i = 0; break; case "01": i = 1; break; case "10": i = 2; break; …

Member Avatar for ddanbe
0
218
Member Avatar for mathews123

You cannot increase or decrease a constant. I would call it a variable. Tons of If? Start with a while loop.

Member Avatar for deceptikon
0
191
Member Avatar for Delnith

Google **basic c# programming** and a plethora of tutorials will be at your disposition.

Member Avatar for ddanbe
0
66
Member Avatar for Eager_Beever
Member Avatar for hetal_lccy
0
1K
Member Avatar for hcbckwidpeace93

I agree with Codefiva, but if you insist on using a console app, perhaps have a look at this [codesnippet](/software-development/csharp/code/371819/code-template-for-a-menu-in-a-console-application). Also avoid us names as **n** for your methods use a meaningfull name.

Member Avatar for ddanbe
0
155
Member Avatar for andutzicus

Hi andutzicus, welcome. Don't know exactly what you mean with your problem. Do you want an int converted to binary? To convert an int to a string you could do something like this: **MyString S = 42.ToString();** S would now contain the string "42".

Member Avatar for andutzicus
0
106
Member Avatar for Dendei
Member Avatar for Dendei
0
221
Member Avatar for wallstr33t
Member Avatar for anisha.silva

Give your variables meaningfull names. A method that retruns void has no need for a return statement.

Member Avatar for anisha.silva
0
201
Member Avatar for garungns
Member Avatar for PennyPeso

From your code I can derive that you could store the first number in the total1 field, or am I wrong?

Member Avatar for ddanbe
0
247
Member Avatar for echo off

cat is a Linux, Unix, MSDOS? command. I seem to remember from the old days there exists a $PATH variable you can set. But I don't know what this has got to do with C# and .NET. I let my users choose from an Open file dialog, with a few …

Member Avatar for gabrielko
0
261
Member Avatar for nmakkena

Open the first file with FileMode.Append. Open the file to append with FileMode.Open. Read the file to append into a byte array. Write the byte array to the first file.

Member Avatar for maordany
0
344
Member Avatar for anisha.silva
Member Avatar for shikha lawrence
Member Avatar for deceptikon
0
207
Member Avatar for Dendei

You could use one of the Key events, and perhaps do something like this: private void textBox1_TextChanged(object sender, EventArgs e) { //Your stuff here } private void textBox1_KeyUp(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { // if it is the enter key, select the next textbox textBox2.Select(); } …

Member Avatar for Dendei
0
353
Member Avatar for Octet

*Just what you want to be, you will be in the end* From the song "Nights in white satin" by the Moody Blues

Member Avatar for roillinpr
0
193
Member Avatar for Dendei

You are mixing some things. Try this as your Customer class class Customer { // three constructors, more if you want to. public Customer() { number = string.Empty; name = string.Empty; phone = string.Empty; } public Customer(string EinKunde) { number = string.Empty; name = EinKunde; phone = string.Empty; } public …

Member Avatar for nmaillet
0
182
Member Avatar for anisha.silva

Why not use the string Split function? http://msdn.microsoft.com/en-us/library/b873y76a.aspx After that sort the string array with the Sort function.

Member Avatar for nmaillet
0
601
Member Avatar for ppc493

That is, because in your code your are reffering to the cells of the DataGridView(DataGridViewCell) I think the info you need is in the DataGridViewColumn class http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.aspx

Member Avatar for AnnieCalvert
0
189
Member Avatar for king03

The TextChanged event only occurs when you do what it says : "change text in a texbox" Add this code in your init methods: fundsTextbox.Text = "100";

Member Avatar for Momerath
0
80
Member Avatar for complete

Automatic property syntax is just some syntax sugar to make your life as a programmer a bit easier. It is meant for trivial get and set. If you want something more elaborate, like an int property wich can only have values between 1 and 30, you have to use the …

Member Avatar for ddanbe
0
544
Member Avatar for kabir383
Member Avatar for wolverinnas

http://msdn.microsoft.com/en-us/library/system.drawing.printing.printpageeventargs.hasmorepages.aspx

Member Avatar for wolverinnas
0
154
Member Avatar for Chonco

What do you mean by "button clear"? Please rephrase your question.

Member Avatar for brylle
0
101
Member Avatar for pratiksavliya
Member Avatar for ddanbe
0
58
Member Avatar for Chonco

In Windows Forms, the Application object has an Exit method: http://msdn.microsoft.com/en-us/library/ms157894.aspx

Member Avatar for ddanbe
0
36
Member Avatar for Dendei

You will usualy have a list of custumers, so you'll most often want to have a Custumer class as pritaeas pointed out.

Member Avatar for Dendei
0
247
Member Avatar for ImagingMachine

I would not advise this. Do you realize you are using pointers, by using the keyword ***new***

Member Avatar for Momerath
0
539
Member Avatar for javanub123

Why not use the DataGridView class? I know this class looks terrifying at first, but if you put some effort into studying it, the rewards will be great! Just an example: http://msdn.microsoft.com/en-us/library/system.windows.forms.datagridviewcolumn.aspx

Member Avatar for ddanbe
0
186
Member Avatar for liliya.tugashkina

I'm wondering why you would want to use a keyboard, when you have a wonderfull tool like DateTimePicker.Just a few mouseclicks and your date is selected in no time!

Member Avatar for liliya.tugashkina
0
741
Member Avatar for shilpa200

Do not really get want you want to do. If you want some file operations have a look at:http://msdn.microsoft.com/en-us/library/system.io.file.aspx#Y0

Member Avatar for shilpa200
0
78
Member Avatar for Dendei

Well this can be a way to start:http://www.daniweb.com/software-development/csharp/code/364073/how-to-set-up-a-modal-dialog-form

Member Avatar for ddanbe
0
266
Member Avatar for cumadhu

To me an array can be considered as ONE value. A method that returns two values could be: [CODE=C#]static int toreturn(int inint, out bool bbool) { if (inint == 42) bbool = true; else bbool = false; return inint*2; }[/CODE] This would return the double value of [B]inint [/B]and [the …

Member Avatar for Michael27
0
549
Member Avatar for kenth21v
Member Avatar for GrimJack

If during summer, you start walking around in khaki shorts, white socks and brown sandals! I'm 57.

Member Avatar for vinnitro
1
3K
Member Avatar for plsoft

BTW Hi Ramy!:) @plsoft The numbers 49 13 10 50 13 10 51 13 10 Are not so random as you think. They are ASCII codes. 49 = '1' 50 = '2' 51 = '3' 13 = 'cr' or '\n' 10 = 'lf' or '\r'

Member Avatar for Ishwarya...
0
157
Member Avatar for vckicks

Your code does not work papanyquiL, at least on my system that is. Check out [url=http://www.daniweb.com/code/snippet217265.html]this[/url]

Member Avatar for Chatthanz
1
847
Member Avatar for lloydy76

Instead of a switch you could use this: [CODE=c#]if (op == '+') result = num1 + num2; else if (op == '-') result = num1 - num2; else if (op == '*') result = num1 * num2; else if (op == '/') result = num1 / num2;[/CODE]

Member Avatar for samsylvestertty
0
6K
Member Avatar for sillyboy
Member Avatar for Helianthus
0
5K
Member Avatar for sam1

You are instantiating a new instance of Form1 so the textbox will be empty. Look at this snippet: [url]http://www.daniweb.com/code/snippet217193.html[/url]

Member Avatar for roemerito
1
2K
Member Avatar for WolfShield

You absolutely have to watch this: [url]http://www.youtube.com/watch?v=abORgnI0NIw[/url]

Member Avatar for itzarun
0
1K

The End.