4,439 Posted Topics

Member Avatar for lxXTaCoXxl

I would not use thz decimal typz here, decimal is for doing money calculations. Use the double type instead.

Member Avatar for lxXTaCoXxl
0
245
Member Avatar for Panathinaikos22

You could start here: [url]http://msdn.microsoft.com/en-us/library/ms747437.aspx[/url]

Member Avatar for Panathinaikos22
0
117
Member Avatar for kavi4u
Member Avatar for Mike Askew
0
126
Member Avatar for trubilo
Member Avatar for behemothdave

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.

Member Avatar for ddanbe
0
108
Member Avatar for riahc3

Also have a look at this: [url]http://www.codeproject.com/KB/android/MonoDroid-Android.aspx[/url]

Member Avatar for riahc3
0
185
Member Avatar for viswa_007

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 …

Member Avatar for Janice44
0
1K
Member Avatar for techlawsam

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 …

Member Avatar for ddanbe
0
220
Member Avatar for C# HELP

If you have a look in the code snippets section, you will find some code just to do that.

Member Avatar for thines01
0
576
Member Avatar for galhajaj

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]

Member Avatar for gusano79
0
96
Member Avatar for yousafc#
Member Avatar for gmahesh211
-1
219
Member Avatar for TurkAlush

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.

Member Avatar for TurkAlush
0
1K
Member Avatar for Beginner sarah
Member Avatar for ddanbe
0
160
Member Avatar for zaxxon216

Also check out this thread : [url]http://www.daniweb.com/forums/post1077746.html#post1077746[/url]

Member Avatar for disa15031992
0
252
Member Avatar for elshan0011

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.

Member Avatar for walid86
0
2K
Member Avatar for alaa sam

Buy a book like [B]C# 4.0: The Complete Reference by Herbert Schildt[/B]

Member Avatar for alaa sam
0
123
Member Avatar for tKc

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.

Member Avatar for tKc
0
429
Member Avatar for ChaseRLewis

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.

Member Avatar for ddanbe
0
111
Member Avatar for Naik Dhiren

Your [B]ds [/B]variable looks like it is a DataSet. DataSets normally don't have such things as columnwidths. Use a DataGridView instead.

Member Avatar for mostnour
0
2K
Member Avatar for z_zendegi

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.

Member Avatar for jz_gook
0
711
Member Avatar for chamnab

[url]http://www.codeguru.com/columns/csharp_learning/article.php/c5845[/url]

Member Avatar for chamnab
0
79
Member Avatar for morfious90

If you know something about WPF you could design a button with label for atom symbol, atomic number etc.

Member Avatar for MORFIOUS
0
2K
Member Avatar for pennywise134

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!

Member Avatar for D19ERY
0
704
Member Avatar for Zarl
Member Avatar for thines01
0
84
Member Avatar for c#learner

[QUOTE=c#learner]( in this [B]case [/B]either 28,29,30,31) is entered [/QUOTE] So why hesitate, use a case statement!

Member Avatar for nick.crane
0
100
Member Avatar for ddanbe

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

Member Avatar for hscoder
0
516
Member Avatar for rainonrooftop

@skatamatic could not unzip or open your zip map. Using Windows 7 Home premium.

Member Avatar for skatamatic
0
109
Member Avatar for ddanbe

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 …

Member Avatar for ddanbe
1
2K
Member Avatar for ddanbe

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 …

Member Avatar for ddanbe
0
414
Member Avatar for ganil_22
Member Avatar for dilansankalpa

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]

Member Avatar for Mitja Bonca
0
249
Member Avatar for novie1

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]

Member Avatar for ddanbe
0
147
Member Avatar for 2aliraza

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

Member Avatar for 2aliraza
0
748
Member Avatar for bettybarnes

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();

Member Avatar for Mitja Bonca
0
186
Member Avatar for ddanbe

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 …

Member Avatar for Wazaah
0
1K
Member Avatar for r_james14

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.

Member Avatar for gusano79
0
94
Member Avatar for ishtine18

Hi ishtine18, welcome on Daniweb! Could you post some code? Without it it is hard to solve your problem.

Member Avatar for Iswariya
0
229
Member Avatar for yousafc#

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]

Member Avatar for ddanbe
0
101
Member Avatar for XmaarX

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

Member Avatar for XmaarX
0
152
Member Avatar for Siimont

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 …

Member Avatar for aadisabri
0
2K
Member Avatar for Jonathan C

Read this: [url]http://msdn.microsoft.com/en-us/library/system.timers.timer(v=VS.100).aspx[/url]

Member Avatar for Jonathan C
0
269
Member Avatar for johnt68

Perhaps you can use this: [url]http://www.daniweb.com/software-development/csharp/code/217189[/url]

Member Avatar for arunkumars
0
156
Member Avatar for ddanbe

A little console application in C# to show you the IP address of your computer or the IP address of any website you like.

Member Avatar for chan_lemo
1
325
Member Avatar for zachattack05

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.

Member Avatar for zachattack05
0
138
Member Avatar for pseudorandom21

Depends on what you like to change in the text strings. Have a look at the methods of the string class.

Member Avatar for Mohammed Ammar
0
134
Member Avatar for Egypt Pharaoh
Member Avatar for megabuild7
0
242
Member Avatar for deefpi

[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

Member Avatar for ddanbe
0
147
Member Avatar for Manswab

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

Member Avatar for Manswab
0
191
Member Avatar for zack_falcon

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]

Member Avatar for zack_falcon
0
194
Member Avatar for ddanbe

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 …

Member Avatar for Teme64
2
945

The End.