4,439 Posted Topics
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 … | |
Re: Decrement the loop counter in your loop. | |
Re: 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 | |
Re: If it consists of a bunch of CDs, use them as something to put your drinks on, just to keep your table clean. :o) | |
Re: 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"); } | |
Re: 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 | |
Re: Google **basic c# programming** and a plethora of tutorials will be at your disposition | |
Re: 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; … | |
Re: You cannot increase or decrease a constant. I would call it a variable. Tons of If? Start with a while loop. | |
Re: Google **basic c# programming** and a plethora of tutorials will be at your disposition. | |
Re: Set the FormBorderStyle property of the child form to [B]none[/B]. | |
Re: 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. | |
Re: 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". | |
Re: Create a **struct** with all the vars in it you want to return. Then return the struct. | |
Re: Also have a loo at this: http://www.csharp-examples.net/string-format-double/ | |
Re: Give your variables meaningfull names. A method that retruns void has no need for a return statement. | |
Re: Could you specify the line where the error occured? | |
Re: From your code I can derive that you could store the first number in the total1 field, or am I wrong? | |
Re: 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 … | |
Re: 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. | |
| |
Re: Which one? http://en.wikipedia.org/wiki/List_of_programming_languages | |
Re: 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(); } … | |
Re: *Just what you want to be, you will be in the end* From the song "Nights in white satin" by the Moody Blues | |
Re: 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 … | |
Re: 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. | |
Re: 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 | |
Re: 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"; | |
Re: 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 … | |
Re: http://msdn.microsoft.com/en-us/library/system.drawing.printing.printpageeventargs.hasmorepages.aspx | |
Re: What do you mean by "button clear"? Please rephrase your question. | |
| |
Re: In Windows Forms, the Application object has an Exit method: http://msdn.microsoft.com/en-us/library/ms157894.aspx | |
Re: You will usualy have a list of custumers, so you'll most often want to have a Custumer class as pritaeas pointed out. | |
Re: I would not advise this. Do you realize you are using pointers, by using the keyword ***new*** | |
Re: 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 | |
Re: 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! | |
Re: 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 | |
Re: 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 | |
Re: 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 … | |
Re: Don't pin yourself on one language. | |
Re: If during summer, you start walking around in khaki shorts, white socks and brown sandals! I'm 57. | |
Re: 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' | |
Re: 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] | |
Re: 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] | |
Re: 21st Century Schizoid Man by King Crimson Check it out! | |
Re: 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] | |
Re: You absolutely have to watch this: [url]http://www.youtube.com/watch?v=abORgnI0NIw[/url] |
The End.