4,439 Posted Topics
Re: I would not use thz decimal typz here, decimal is for doing money calculations. Use the double type instead. | |
Re: You could start here: [url]http://msdn.microsoft.com/en-us/library/ms747437.aspx[/url] | |
Re: Have a look here: [url]http://msdn.microsoft.com/en-us/library/bbd5w3b8.aspx[/url] | |
Re: Implement it via a button click handler or use a menu. | |
Re: Change line 27 into intValue = Convert.ToInt32([B]userInput[/B]); Unless you type something like "I get bored watching an F" and type nothing but integers it should work alot better. | |
Re: Also have a look at this: [url]http://www.codeproject.com/KB/android/MonoDroid-Android.aspx[/url] | |
Re: I must agree with Jugortha. Datagridview is (as I see it) intended for use within a database context : displaying rows from a databasetable. So you can have a column with dates and a column with strings, but not intermixed. I know we had the same problem years ago( I … | |
Re: Well, try to change your for loops to this: [CODE=c#]for (int a = 1; a <= 10; a++) { for (int b = 1; b <= 10; b++) { Console.Write("{0}\t",(a * b).ToString()); } //DisplayResults(); display is already done by Write and WriteLine Console.WriteLine(); }[/CODE] If there are things you don't … | |
Re: If you have a look in the code snippets section, you will find some code just to do that. | |
Re: Well, in the end it all boils down to pixels on a screen of course. But with the advent of truetype fonts, the discrete handling(with integers) was not sufficient, hence the use of float. You could perhaps read [url=http://en.wikipedia.org/wiki/TrueType]this article.[/url] | |
Re: Have a look at this thread, it has a zip file somewhere with some code. | |
Re: Start a Windows form application. Add 3 Textboxes. Call them Number1, Number2 and Result. Add a Button, in the Click handler add the values of Number1 and Nuber2 and put the result in the Result Textbox. | |
Re: You could update the Text property of several Labels in your Button Click handler. | |
Re: Also check out this thread : [url]http://www.daniweb.com/forums/post1077746.html#post1077746[/url] | |
Re: I guess your mainform is in fact your login form. Line 8 of your code closes it, together with frmMain. Instead of closing your main form, use the Visible property. | |
Re: Buy a book like [B]C# 4.0: The Complete Reference by Herbert Schildt[/B] | |
Re: Don't forget to do a modulus operation with 255 after you called the max method. Your color component might end up being greater than 255. | |
Re: WPF is indeed the way to go for UI programming in windows. Keep in mind that the learning curve is high, that WPF is more or less about wistles and bells. | |
Re: Your [B]ds [/B]variable looks like it is a DataSet. DataSets normally don't have such things as columnwidths. Use a DataGridView instead. | |
Re: Don't know what "print them in CM " is. Take into account that dpi(dots per inch) on the screen almost always differs from the dpi on a printer. | |
Re: [url]http://www.codeguru.com/columns/csharp_learning/article.php/c5845[/url] | |
Re: If you know something about WPF you could design a button with label for atom symbol, atomic number etc. | |
Re: Every time you click the add button, you got to - fill in the array(I guess you have to use arrays) at index scorecount(check for out of range!) - increment your scorecount - update your score total - calculate the average - fill in the appropriate textboxes Success! | |
| |
Re: [QUOTE=c#learner]( in this [B]case [/B]either 28,29,30,31) is entered [/QUOTE] So why hesitate, use a case statement! | |
Just start a new Windows Forms Application and change the Form1 constructor to this code(which was copied from MSDN) [CODE=csharp] public Form1() { InitializeComponent(); // Create the calendar. MonthCalendar monthCalendar2 = new System.Windows.Forms.MonthCalendar(); // Set the calendar location. monthCalendar2.Location = new System.Drawing.Point(50, 50); // Change the color. monthCalendar2.BackColor = System.Drawing.SystemColors.Info; … | |
Re: @skatamatic could not unzip or open your zip map. Using Windows 7 Home premium. | |
This is a series of 3 code snippets which together form a completly working "calculator". I used a console application in VS C# 2008, but 2005 should cause no problems. To start with : here you have the code for a scanner class. A scanner reads the inputline and tries … | |
This is code to plot a "random walk" in polar coordinates.See also: [url]http://www.daniweb.com/software-development/csharp/code/379275[/url] Just posted the code of my main form, more details can be found in the zip file. I also included a sample output. I perhaps intend to use this in some sort of game, were a biologist … | |
Re: You could start here [url]http://msdn.microsoft.com/en-us/default[/url] | |
Re: Why not use a DateTimePicker? To convert a date to another format, have a look at this: [url]http://www.csharp-examples.net/string-format-datetime/[/url] | |
Re: Also, have a look at this: [url]http://msdn.microsoft.com/en-us/library/aa691315(VS.71).aspx[/url] and this: [url]http://www.daniweb.com/software-development/csharp/code/217189[/url] | |
Re: Write an IsPrime function. also on line 6 you don't have to let go the variable y all the way to 20. The square root of 20 will do. See : [CODE=c#]int x, y; bool a = true; int SQRT = (int)Math.Sqrt(20); // SQRT=4 for (x = 1; x <= … | |
Re: Because the Text property of TextBox is of type string and not of type integer. C# is very picky about this, and as a matter of fact this is one of the things I like about C# :) Alternatively you could write: TextBox1.Text = 1.ToString(); | |
This is not about a DataGridView or something else, it is just about drawing a simple grid in a form window. Googled a bit but found not much of my liking. A Grid as a BitMap in a PictureBox? Come on! Must have been some of those GUI guys I … | |
Re: I should use the [url=http://msdn.microsoft.com/en-us/library/system.string.split(v=VS.90).aspx]string split method[/url]and split on the underscore and also sheck out the members of the DateTime struct. | |
Re: Hi ishtine18, welcome on Daniweb! Could you post some code? Without it it is hard to solve your problem. | |
Re: Xerox was first with a "windows" based user interface, than came Apple, followed by IBM. [url]http://theoligarch.com/microsoft_vs_apple_history.htm[/url] | |
Re: Card games are perfect to use arrays or collections with. Have not downloaded this: [url]http://www.c-sharpcorner.com/UploadFile/p_bedse/CardGame11292005063649AM/CardGame.aspx[/url] But I think you could at lest have a look at it. Succes :) | |
Re: Hi Siimont, welcome on the daniweb site. Have a look at [url=http://www.daniweb.com/forums/thread201807.html]this thread[/url], in one of the posts it has a zip file with some code for a calculator. It is a simulation of a calculator I have at home. It acts differently than the MS one but if you … | |
Re: Read this: [url]http://msdn.microsoft.com/en-us/library/system.timers.timer(v=VS.100).aspx[/url] | |
Re: Perhaps you can use this: [url]http://www.daniweb.com/software-development/csharp/code/217189[/url] | |
A little console application in C# to show you the IP address of your computer or the IP address of any website you like. | |
Re: Depends on the class you are building. I tend to put all my buttonclick handlers in a region and my MenuItemclicks in another region. There are no rules I guess. Just be consistent. | |
Re: Depends on what you like to change in the text strings. Have a look at the methods of the string class. | |
Re: Google [B]binary to decimal in C#[/B] you may find what you need. | |
Re: [QUOTE] need change a cells background color in datagrid where values is other than null.[/QUOTE] I Guess you better try to test the Value on line 6 for null, don't test Value.ToString | |
Re: So what have you tried for yourself? Even if the code you tried seems ridiculous and bad,don't mind. Send it, it shows us you have done some effort. :) | |
Re: Why not make an array of Buttons and create them dynaically during startup? Another possibility might be this snippet: [url]http://www.daniweb.com/software-development/csharp/code/256776[/url] | |
The VS designer is a wonderful tool to use and saves you lots of time. One drawback though. If you have a lot of the same controls and you want to change some properties of it at runtime, you got some coding to do. Say you want to change the … |
The End.